diff options
author | Vivia Nikolaidou <vivia@ahiru.eu> | 2019-10-11 17:25:04 +0300 |
---|---|---|
committer | Jan Schmidt <thaytan@noraisin.net> | 2019-11-14 12:16:04 +0000 |
commit | 413c6ec57b6bad7c2e6ccf7c3933ea81b98ad506 (patch) | |
tree | ddc46bc1872f6837ad72e12533c6689a058f8152 /gst/mpegtsdemux/tsdemux.c | |
parent | 9f4b04316162b74cb970bf682ab0622779349bac (diff) | |
download | gstreamer-plugins-bad-413c6ec57b6bad7c2e6ccf7c3933ea81b98ad506.tar.gz |
tsdemux: Always issue a DTS even when it's equal to PTS
Currently tsdemux timestamps only the PTS, and only issues the DTS if
it's different. In that case, parsers tend to estimate the next DTS
based on the previous DTS and the duration, which can accumulate
rounding errors.
Diffstat (limited to 'gst/mpegtsdemux/tsdemux.c')
-rw-r--r-- | gst/mpegtsdemux/tsdemux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index 53f92e329..c50f81179 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -3103,7 +3103,8 @@ gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream, buffer = gst_buffer_list_get (buffer_list, 0); if (GST_CLOCK_TIME_IS_VALID (stream->pts)) - GST_BUFFER_PTS (buffer) = stream->pts; + GST_BUFFER_PTS (buffer) = GST_BUFFER_DTS (buffer) = stream->pts; + /* DTS = PTS by default, we override it if there's a real DTS */ if (GST_CLOCK_TIME_IS_VALID (stream->dts)) GST_BUFFER_DTS (buffer) = stream->dts; |