mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
mpegpsdemux: avoid early EOS
In a case of a scr different from 0, after a seek, the src_segment.stop has been updated with the duration not including the base_time (scr). The segment position needs to be tested upon segment.stop + base_time (scr) to check for an EOS. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2048>
This commit is contained in:
parent
32fa99d3e0
commit
96467f581e
1 changed files with 3 additions and 1 deletions
|
@ -2980,9 +2980,11 @@ gst_ps_demux_loop (GstPad * pad)
|
|||
offset += size;
|
||||
gst_segment_set_position (&demux->sink_segment, GST_FORMAT_BYTES, offset);
|
||||
/* check EOS condition */
|
||||
/* FIXME: The src_segment.stop is not including the SCR after seek(set) */
|
||||
if ((demux->sink_segment.position >= demux->sink_segment.stop) ||
|
||||
(demux->src_segment.stop != (guint64) - 1 &&
|
||||
demux->src_segment.position >= demux->src_segment.stop)) {
|
||||
demux->src_segment.position >=
|
||||
demux->src_segment.stop + demux->base_time)) {
|
||||
GST_DEBUG_OBJECT (demux,
|
||||
"forward mode using segment reached end of " "segment pos %"
|
||||
GST_TIME_FORMAT " stop %" GST_TIME_FORMAT " pos in bytes %"
|
||||
|
|
Loading…
Reference in a new issue