From d585bd7bbdb8a262a1c31f268090e18842fc9579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 4 Dec 2013 21:57:48 +0100 Subject: [PATCH] rtptheorapay: Don't send headers twice if we got them from the caps already --- gst/rtp/gstrtptheorapay.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gst/rtp/gstrtptheorapay.c b/gst/rtp/gstrtptheorapay.c index 379e04ddec..10055c0f4e 100644 --- a/gst/rtp/gstrtptheorapay.c +++ b/gst/rtp/gstrtptheorapay.c @@ -771,8 +771,14 @@ gst_rtp_theora_pay_handle_buffer (GstRTPBasePayload * basepayload, ret = GST_FLOW_OK; goto done; } else if (rtptheorapay->headers) { - if (!gst_rtp_theora_pay_finish_headers (basepayload)) - goto header_error; + if (rtptheorapay->need_headers) { + if (!gst_rtp_theora_pay_finish_headers (basepayload)) + goto header_error; + } else { + g_list_free_full (rtptheorapay->headers, + (GDestroyNotify) gst_buffer_unref); + rtptheorapay->headers = NULL; + } } /* there is a config request, see if we need to insert it */