From 29f906201632b05a7f5b143b8fa1ed3c504e4006 Mon Sep 17 00:00:00 2001 From: Jochen Henneberg Date: Thu, 9 Feb 2017 12:46:54 +0000 Subject: [PATCH] rtpvorbispay: Update and send out headers when new headers are received The payloader needs to reset and update the vorbis config data which is pushed on the network if it receives new headers, or at least, it may have to do so. Without this, the stream configuration could change without the payloader sending the new configuration to the other side. --- gst/rtp/gstrtpvorbispay.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst/rtp/gstrtpvorbispay.c b/gst/rtp/gstrtpvorbispay.c index 1a698c0c0b..81bd7320ea 100644 --- a/gst/rtp/gstrtpvorbispay.c +++ b/gst/rtp/gstrtpvorbispay.c @@ -780,6 +780,13 @@ gst_rtp_vorbis_pay_handle_buffer (GstRTPBasePayload * basepayload, /* we need to collect the headers and construct a config string from them */ if (VDT != 0) { + if (!rtpvorbispay->need_headers) { + GST_INFO_OBJECT (rtpvorbispay, "getting new headers, replace existing"); + g_list_free_full (rtpvorbispay->headers, + (GDestroyNotify) gst_buffer_unref); + rtpvorbispay->headers = NULL; + rtpvorbispay->need_headers = TRUE; + } GST_DEBUG_OBJECT (rtpvorbispay, "collecting header"); /* append header to the list of headers */ gst_buffer_unmap (buffer, &map);