mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
basesink: improve last_stop calculation
Only update the last_stop value when we had a valid stop position for the clipping or else the clipping code assumes the stop position extends to the end of the segment, which makes the position reporting return weird values.
This commit is contained in:
parent
4fd63f0ce2
commit
6da39bf508
1 changed files with 1 additions and 1 deletions
|
@ -1962,7 +1962,7 @@ again:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set last stop position */
|
/* set last stop position */
|
||||||
if (G_LIKELY (cstop != GST_CLOCK_TIME_NONE))
|
if (G_LIKELY (stop != GST_CLOCK_TIME_NONE && cstop != GST_CLOCK_TIME_NONE))
|
||||||
gst_segment_set_last_stop (segment, GST_FORMAT_TIME, cstop);
|
gst_segment_set_last_stop (segment, GST_FORMAT_TIME, cstop);
|
||||||
else
|
else
|
||||||
gst_segment_set_last_stop (segment, GST_FORMAT_TIME, cstart);
|
gst_segment_set_last_stop (segment, GST_FORMAT_TIME, cstart);
|
||||||
|
|
Loading…
Reference in a new issue