mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
qtmux: Use buffer PTS if DTS is not set
Avoids ending up with completely bogus scaled duration/pts when new buffers have invalid DTS.
This commit is contained in:
parent
67eb029a50
commit
4f4f6432cc
1 changed files with 4 additions and 1 deletions
|
@ -2229,7 +2229,10 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
|
||||||
if (pad->have_dts) {
|
if (pad->have_dts) {
|
||||||
gint64 scaled_dts;
|
gint64 scaled_dts;
|
||||||
if (pad->last_buf) {
|
if (pad->last_buf) {
|
||||||
pad->last_dts = GST_BUFFER_DTS (pad->last_buf);
|
if (GST_BUFFER_DTS_IS_VALID (pad->last_buf))
|
||||||
|
pad->last_dts = GST_BUFFER_DTS (pad->last_buf);
|
||||||
|
else
|
||||||
|
pad->last_dts = GST_BUFFER_PTS (pad->last_buf);
|
||||||
} else {
|
} else {
|
||||||
pad->last_dts = GST_BUFFER_DTS (last_buf) +
|
pad->last_dts = GST_BUFFER_DTS (last_buf) +
|
||||||
GST_BUFFER_DURATION (last_buf);
|
GST_BUFFER_DURATION (last_buf);
|
||||||
|
|
Loading…
Reference in a new issue