mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
avidemux: tweak some ported segment handling
... to avoid losing duration during push mode seeking, and to properly accumulate running time when segment seeking.
This commit is contained in:
parent
f0749ed617
commit
65bb271a95
1 changed files with 11 additions and 0 deletions
|
@ -805,6 +805,10 @@ gst_avi_demux_handle_sink_event (GstPad * pad, GstEvent * event)
|
|||
segment.format = GST_FORMAT_TIME;
|
||||
segment.start = segment.time;
|
||||
segment.stop = GST_CLOCK_TIME_NONE;
|
||||
segment.position = segment.start;
|
||||
|
||||
/* rescue duration */
|
||||
segment.duration = avi->segment.duration;
|
||||
|
||||
/* set up segment and send downstream */
|
||||
gst_segment_copy_into (&segment, &avi->segment);
|
||||
|
@ -5139,6 +5143,13 @@ pause:{
|
|||
|
||||
if (res == GST_FLOW_UNEXPECTED) {
|
||||
/* handle end-of-stream/segment */
|
||||
/* so align our position with the end of it, if there is one
|
||||
* this ensures a subsequent will arrive at correct base/acc time */
|
||||
if (avi->segment.rate > 0.0 &&
|
||||
GST_CLOCK_TIME_IS_VALID (avi->segment.stop))
|
||||
avi->segment.position = avi->segment.stop;
|
||||
else if (avi->segment.rate < 0.0)
|
||||
avi->segment.position = avi->segment.start;
|
||||
if (avi->segment.flags & GST_SEEK_FLAG_SEGMENT) {
|
||||
gint64 stop;
|
||||
|
||||
|
|
Loading…
Reference in a new issue