diff options
author | Olivier Crete <tester@tester.ca> | 2008-08-05 09:42:53 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-08-05 09:42:53 +0000 |
commit | 971ec2d278fe51f1239f2d730c48e9a1beb1fa15 (patch) | |
tree | aed2bf3277b4884c3c301b24703c72165d8b71af /gst/rtpmanager/gstrtpjitterbuffer.c | |
parent | e0f52ef74db25bf2f7593ff5c34c7d85fe05a39e (diff) | |
download | gst-plugins-bad-971ec2d278fe51f1239f2d730c48e9a1beb1fa15.tar.gz gst-plugins-bad-971ec2d278fe51f1239f2d730c48e9a1beb1fa15.tar.bz2 gst-plugins-bad-971ec2d278fe51f1239f2d730c48e9a1beb1fa15.zip |
gst/rtpmanager/gstrtpjitterbuffer.c: Make the buffer metadata writable before inserting it in the jitterbuffer becaus...
Original commit message from CVS:
Based on patch by: Olivier Crete <tester at tester dot ca>
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop):
Make the buffer metadata writable before inserting it in the
jitterbuffer because the jitterbuffer will modify the timestamps.
* gst/rtpmanager/rtpjitterbuffer.c:
Update method comment about requiring writable metadata on buffers.
* gst/rtpmanager/rtpsession.c: (rtp_session_process_sr),
(rtp_session_process_rtcp):
Make the RTCP buffer metadata writable because we want to modify the
metadata.
Fixes #546312.
Diffstat (limited to 'gst/rtpmanager/gstrtpjitterbuffer.c')
-rw-r--r-- | gst/rtpmanager/gstrtpjitterbuffer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index 52430ff2..b9b15691 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -927,6 +927,10 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstBuffer * buffer) } } + /* we need to make the metadata writable before pushing it in the jitterbuffer + * because the jitterbuffer will update the timestamp */ + buffer = gst_buffer_make_metadata_writable (buffer); + /* now insert the packet into the queue in sorted order. This function returns * FALSE if a packet with the same seqnum was already in the queue, meaning we * have a duplicate. */ @@ -1236,8 +1240,8 @@ push_buffer: outbuf = rtp_jitter_buffer_pop (priv->jbuf); if (discont || priv->discont) { - /* set DISCONT flag when we missed a packet. */ - outbuf = gst_buffer_make_metadata_writable (outbuf); + /* set DISCONT flag when we missed a packet. We pushed the buffer writable + * into the jitterbuffer so we can modify now. */ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); priv->discont = FALSE; } |