From 0915d696c7a3bfc3bca370b0920d12a0bb5855c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 4 Dec 2013 21:55:53 +0100 Subject: [PATCH] rtpvorbispay: Don't send headers twice if we got them from the caps already --- gst/rtp/gstrtpvorbispay.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gst/rtp/gstrtpvorbispay.c b/gst/rtp/gstrtpvorbispay.c index 93190b4943..265479b7c2 100644 --- a/gst/rtp/gstrtpvorbispay.c +++ b/gst/rtp/gstrtpvorbispay.c @@ -761,8 +761,14 @@ gst_rtp_vorbis_pay_handle_buffer (GstRTPBasePayload * basepayload, ret = GST_FLOW_OK; goto done; } else if (rtpvorbispay->headers) { - if (!gst_rtp_vorbis_pay_finish_headers (basepayload)) - goto header_error; + if (rtpvorbispay->need_headers) { + if (!gst_rtp_vorbis_pay_finish_headers (basepayload)) + goto header_error; + } else { + g_list_free_full (rtpvorbispay->headers, + (GDestroyNotify) gst_buffer_unref); + rtpvorbispay->headers = NULL; + } } /* there is a config request, see if we need to insert it */