aboutsummaryrefslogtreecommitdiffstats
path: root/src/encoder/vorbis_encoder.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-05-05 22:37:13 +0200
committerMax Kellermann <max@duempel.org>2009-05-05 22:37:13 +0200
commit7875072d3860865aadcbd245c71e86b6c94203d4 (patch)
tree520a192f9a09eaae326e33c1c2c1b38f035fb2dd /src/encoder/vorbis_encoder.c
parent795569208a6f81afc35b61312b168aa9225dddfe (diff)
downloadmpd-7875072d3860865aadcbd245c71e86b6c94203d4.tar.gz
mpd-7875072d3860865aadcbd245c71e86b6c94203d4.tar.xz
mpd-7875072d3860865aadcbd245c71e86b6c94203d4.zip
vorbis_encoder: moved code to vorbis_encoder_headerout()
Diffstat (limited to 'src/encoder/vorbis_encoder.c')
-rw-r--r--src/encoder/vorbis_encoder.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/encoder/vorbis_encoder.c b/src/encoder/vorbis_encoder.c
index 2e54b18d3..0332f1106 100644
--- a/src/encoder/vorbis_encoder.c
+++ b/src/encoder/vorbis_encoder.c
@@ -181,20 +181,25 @@ vorbis_encoder_reinit(struct vorbis_encoder *encoder, GError **error)
}
static void
-vorbis_encoder_send_header(struct vorbis_encoder *encoder)
+vorbis_encoder_headerout(struct vorbis_encoder *encoder, vorbis_comment *vc)
{
- vorbis_comment vc;
ogg_packet packet, comments, codebooks;
- vorbis_comment_init(&vc);
-
- vorbis_analysis_headerout(&encoder->vd, &vc,
+ vorbis_analysis_headerout(&encoder->vd, vc,
&packet, &comments, &codebooks);
ogg_stream_packetin(&encoder->os, &packet);
ogg_stream_packetin(&encoder->os, &comments);
ogg_stream_packetin(&encoder->os, &codebooks);
+}
+static void
+vorbis_encoder_send_header(struct vorbis_encoder *encoder)
+{
+ vorbis_comment vc;
+
+ vorbis_comment_init(&vc);
+ vorbis_encoder_headerout(encoder, &vc);
vorbis_comment_clear(&vc);
}