Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
3333502e
Commit
3333502e
authored
Mar 15, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vorbis_encoder: use vorbis_commentheader_out() in the tag() method
Don't reinitialize the encoder with every tag.
parent
2b74311b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
vorbis_encoder.c
src/encoder/vorbis_encoder.c
+15
-6
No files found.
src/encoder/vorbis_encoder.c
View file @
3333502e
...
...
@@ -302,17 +302,26 @@ copy_tag_to_vorbis_comment(vorbis_comment *vc, const struct tag *tag)
static
bool
vorbis_encoder_tag
(
struct
encoder
*
_encoder
,
const
struct
tag
*
tag
,
GError
**
error
)
G
_GNUC_UNUSED
G
Error
**
error
)
{
struct
vorbis_encoder
*
encoder
=
(
struct
vorbis_encoder
*
)
_encoder
;
vorbis_comment
comment
;
ogg_packet
packet
;
vorbis_encoder_clear
(
encoder
);
if
(
!
vorbis_encoder_reinit
(
encoder
,
error
))
return
false
;
/* write the vorbis_comment object */
copy_tag_to_vorbis_comment
(
&
encoder
->
vc
,
tag
);
vorbis_comment_init
(
&
comment
);
copy_tag_to_vorbis_comment
(
&
comment
,
tag
);
vorbis_encoder_send_header
(
encoder
);
/* convert that vorbis_comment into a ogg_packet */
vorbis_commentheader_out
(
&
comment
,
&
packet
);
vorbis_comment_clear
(
&
comment
);
/* .. and send it into the ogg_stream_state */
ogg_stream_packetin
(
&
encoder
->
os
,
&
packet
);
ogg_packet_clear
(
&
packet
);
return
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment