diff options
author | Jochen Henneberg <jh@henneberg-systemdesign.com> | 2017-02-09 12:46:54 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-02-20 14:21:13 +0200 |
commit | 29f906201632b05a7f5b143b8fa1ed3c504e4006 (patch) | |
tree | d3674ca10188d44137a96d2d6af36bd116527608 | |
parent | d8868c633900a77139ea263b4bfe26970991d8a0 (diff) |
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.
-rw-r--r-- | gst/rtp/gstrtpvorbispay.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gst/rtp/gstrtpvorbispay.c b/gst/rtp/gstrtpvorbispay.c index 1a698c0c0..81bd7320e 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); |