mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
mpegtsdemux: Keep the position increasing.
Don't keep the segment position jumping back and forth based on stream DTS/PTS, only increase the position if the new value is larger than the old.
This commit is contained in:
parent
32d650491c
commit
b7c4785a22
1 changed files with 7 additions and 4 deletions
|
@ -3051,10 +3051,13 @@ gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream,
|
|||
GST_TIME_FORMAT, (buffer_list ? "list" : ""), GST_TIME_ARGS (stream->pts),
|
||||
GST_TIME_ARGS (stream->dts));
|
||||
|
||||
if (GST_CLOCK_TIME_IS_VALID (stream->dts))
|
||||
base->out_segment.position = stream->dts;
|
||||
else if (GST_CLOCK_TIME_IS_VALID (stream->pts))
|
||||
base->out_segment.position = stream->pts;
|
||||
if (GST_CLOCK_TIME_IS_VALID (stream->dts)) {
|
||||
if (stream->dts > base->out_segment.position)
|
||||
base->out_segment.position = stream->dts;
|
||||
} else if (GST_CLOCK_TIME_IS_VALID (stream->pts)) {
|
||||
if (stream->pts > base->out_segment.position)
|
||||
base->out_segment.position = stream->pts;
|
||||
}
|
||||
|
||||
if (buffer) {
|
||||
res = gst_pad_push (stream->pad, buffer);
|
||||
|
|
Loading…
Reference in a new issue