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.
This commit is contained in:
Jochen Henneberg 2017-02-09 12:46:54 +00:00 committed by Sebastian Dröge
parent d8868c6339
commit 29f9062016

View file

@ -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);