From de7e1cb6dd8e5031b1d1d9a64fdda955bae54501 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 16 Aug 2013 13:26:28 +0200 Subject: [PATCH] flacenc: Properly set headers via the base class instead of just pushing them downstream Prevents buffers from being send before the caps and segment events. --- ext/flac/gstflacenc.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index 311b5dc..e71e5cd 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -1108,23 +1108,7 @@ gst_flac_enc_process_stream_headers (GstFlacEnc * enc) push_headers: gst_audio_encoder_set_output_format (GST_AUDIO_ENCODER (enc), caps); - /* push header buffers; update caps, so when we push the first buffer the - * negotiated caps will change to caps that include the streamheader field */ - for (l = enc->headers; l != NULL; l = l->next) { - GstBuffer *buf; - - buf = GST_BUFFER (l->data); - GST_LOG_OBJECT (enc, - "Pushing header buffer, size %" G_GSIZE_FORMAT " bytes", - gst_buffer_get_size (buf)); -#if 0 - GST_MEMDUMP_OBJECT (enc, "header buffer", GST_BUFFER_DATA (buf), - GST_BUFFER_SIZE (buf)); -#endif - ret = gst_pad_push (GST_AUDIO_ENCODER_SRC_PAD (enc), buf); - l->data = NULL; - } - g_list_free (enc->headers); + gst_audio_encoder_set_headers (GST_AUDIO_ENCODER (enc), enc->headers); enc->headers = NULL; gst_caps_unref (caps); -- 2.7.4