From 7875072d3860865aadcbd245c71e86b6c94203d4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 5 May 2009 22:37:13 +0200 Subject: vorbis_encoder: moved code to vorbis_encoder_headerout() --- src/encoder/vorbis_encoder.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3