mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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.
This commit is contained in:
parent
e0f52ef74d
commit
971ec2d278
4 changed files with 31 additions and 2 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
||||||
|
2008-08-05 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
2008-08-05 Wim Taymans <wim.taymans@collabora.co.uk>
|
2008-08-05 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
* gst/selector/gstinputselector.c: (gst_selector_pad_bufferalloc),
|
* gst/selector/gstinputselector.c: (gst_selector_pad_bufferalloc),
|
||||||
|
|
|
@ -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
|
/* 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
|
* FALSE if a packet with the same seqnum was already in the queue, meaning we
|
||||||
* have a duplicate. */
|
* have a duplicate. */
|
||||||
|
@ -1236,8 +1240,8 @@ push_buffer:
|
||||||
outbuf = rtp_jitter_buffer_pop (priv->jbuf);
|
outbuf = rtp_jitter_buffer_pop (priv->jbuf);
|
||||||
|
|
||||||
if (discont || priv->discont) {
|
if (discont || priv->discont) {
|
||||||
/* set DISCONT flag when we missed a packet. */
|
/* set DISCONT flag when we missed a packet. We pushed the buffer writable
|
||||||
outbuf = gst_buffer_make_metadata_writable (outbuf);
|
* into the jitterbuffer so we can modify now. */
|
||||||
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
|
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
|
||||||
priv->discont = FALSE;
|
priv->discont = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,6 +339,7 @@ no_skew:
|
||||||
* Inserts @buf into the packet queue of @jbuf. The sequence number of the
|
* Inserts @buf into the packet queue of @jbuf. The sequence number of the
|
||||||
* packet will be used to sort the packets. This function takes ownerhip of
|
* packet will be used to sort the packets. This function takes ownerhip of
|
||||||
* @buf when the function returns %TRUE.
|
* @buf when the function returns %TRUE.
|
||||||
|
* @buf should have writable metadata when calling this function.
|
||||||
*
|
*
|
||||||
* Returns: %FALSE if a packet with the same number already existed.
|
* Returns: %FALSE if a packet with the same number already existed.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1437,6 +1437,9 @@ rtp_session_process_sr (RTPSession * sess, GstRTCPPacket * packet,
|
||||||
if (!source)
|
if (!source)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* we somehow need to transfer the clock_base and the base time to the next
|
||||||
|
* element, we use the offset and offset_end fields in the buffer for this
|
||||||
|
* hack */
|
||||||
GST_BUFFER_OFFSET (packet->buffer) = source->clock_base;
|
GST_BUFFER_OFFSET (packet->buffer) = source->clock_base;
|
||||||
GST_BUFFER_OFFSET_END (packet->buffer) = source->clock_base_time;
|
GST_BUFFER_OFFSET_END (packet->buffer) = source->clock_base_time;
|
||||||
|
|
||||||
|
@ -1669,6 +1672,9 @@ rtp_session_process_rtcp (RTPSession * sess, GstBuffer * buffer,
|
||||||
if (sess->sent_bye)
|
if (sess->sent_bye)
|
||||||
goto ignore;
|
goto ignore;
|
||||||
|
|
||||||
|
/* make writable, we might want to change the buffer */
|
||||||
|
buffer = gst_buffer_make_metadata_writable (buffer);
|
||||||
|
|
||||||
/* start processing the compound packet */
|
/* start processing the compound packet */
|
||||||
more = gst_rtcp_buffer_get_first_packet (buffer, &packet);
|
more = gst_rtcp_buffer_get_first_packet (buffer, &packet);
|
||||||
while (more) {
|
while (more) {
|
||||||
|
|
Loading…
Reference in a new issue