mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
qtdemux: fix conditions for end of segment in reverse playback
The time_position field of the stream is offset by the media_start of its QtDemuxSegment compared to the start of the GstSegment of the demuxer, take it into account when making comparisons.
This commit is contained in:
parent
67b8ce3167
commit
9deb3c27ac
1 changed files with 9 additions and 1 deletions
|
@ -6305,8 +6305,16 @@ gst_qtdemux_loop_state_movie (GstQTDemux * qtdemux)
|
|||
stream = QTDEMUX_NTH_STREAM (qtdemux, i);
|
||||
position = stream->time_position;
|
||||
|
||||
if (!GST_CLOCK_TIME_IS_VALID (position))
|
||||
continue;
|
||||
|
||||
if (stream->segment_index != -1) {
|
||||
QtDemuxSegment *segment = &stream->segments[stream->segment_index];
|
||||
position += segment->media_start;
|
||||
}
|
||||
|
||||
/* position of -1 is EOS */
|
||||
if (position != GST_CLOCK_TIME_NONE && position < min_time) {
|
||||
if (position < min_time) {
|
||||
min_time = position;
|
||||
target_stream = stream;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue