mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 13:36:39 +00:00
rtpmp4gdepay: Set duration on outgoing buffers
If we have constant duration buffers, set the duration on outgoing buffers, like rtpmp4adepay does. This fixes problems with (for example) muxers like mp4mux not writing the duration of the final sample into the index. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6878>
This commit is contained in:
parent
b8a8eacdb2
commit
64133b40a7
1 changed files with 3 additions and 0 deletions
|
@ -717,6 +717,9 @@ gst_rtp_mp4g_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
|
||||||
* in this RTP packet. */
|
* in this RTP packet. */
|
||||||
timestamp += (rtpmp4gdepay->constantDuration * GST_SECOND) /
|
timestamp += (rtpmp4gdepay->constantDuration * GST_SECOND) /
|
||||||
depayload->clock_rate;
|
depayload->clock_rate;
|
||||||
|
|
||||||
|
/* Set the duration for the outgoing buffer */
|
||||||
|
GST_BUFFER_DURATION (outbuf) = timestamp - GST_BUFFER_PTS (outbuf);
|
||||||
} else {
|
} else {
|
||||||
/* otherwise, make sure we don't use the timestamp again for other
|
/* otherwise, make sure we don't use the timestamp again for other
|
||||||
* AUs. */
|
* AUs. */
|
||||||
|
|
Loading…
Reference in a new issue