mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
basesrc: Fix the way position is computed in reverse playback
In reverse playback, buffers are played back from buffer.stop (buffer.pts + buffer.duration) to buffer.pts, which means that the position after the buffer is consumed is buffer.pts, not buffer.pts - buffer.duration. Without that change, and when `automatic_eos` feature is on, we were dropping the last buffers as marking the stream EOS one buffer too soon. This is now being tested extensively by GstValidate in the `validate.test.clock_sync.*` set of tests. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/450>
This commit is contained in:
parent
dc1a1e5275
commit
4a025d77ac
1 changed files with 0 additions and 4 deletions
|
@ -2918,10 +2918,6 @@ gst_base_src_loop (GstPad * pad)
|
||||||
if (GST_CLOCK_TIME_IS_VALID (duration)) {
|
if (GST_CLOCK_TIME_IS_VALID (duration)) {
|
||||||
if (src->segment.rate >= 0.0)
|
if (src->segment.rate >= 0.0)
|
||||||
position += duration;
|
position += duration;
|
||||||
else if (position > duration)
|
|
||||||
position -= duration;
|
|
||||||
else
|
|
||||||
position = 0;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue