mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
avidemux: reset some more stream state after seek
In particular, fixes non-flushing seek.
This commit is contained in:
parent
e2f5409d40
commit
172c0c6a6a
1 changed files with 6 additions and 7 deletions
|
@ -4047,13 +4047,6 @@ gst_avi_demux_handle_seek (GstAviDemux * avi, GstPad * pad, GstEvent * event)
|
||||||
GST_DEBUG_OBJECT (avi, "sending flush stop");
|
GST_DEBUG_OBJECT (avi, "sending flush stop");
|
||||||
gst_avi_demux_push_event (avi, gst_event_ref (fevent));
|
gst_avi_demux_push_event (avi, gst_event_ref (fevent));
|
||||||
gst_pad_push_event (avi->sinkpad, fevent);
|
gst_pad_push_event (avi->sinkpad, fevent);
|
||||||
|
|
||||||
/* reset the last flow and mark discont, FLUSH is always DISCONT */
|
|
||||||
for (i = 0; i < avi->num_streams; i++) {
|
|
||||||
GST_DEBUG_OBJECT (avi, "marking DISCONT");
|
|
||||||
avi->stream[i].last_flow = GST_FLOW_OK;
|
|
||||||
avi->stream[i].discont = TRUE;
|
|
||||||
}
|
|
||||||
} else if (avi->segment_running) {
|
} else if (avi->segment_running) {
|
||||||
GstEvent *seg;
|
GstEvent *seg;
|
||||||
|
|
||||||
|
@ -4101,6 +4094,12 @@ gst_avi_demux_handle_seek (GstAviDemux * avi, GstPad * pad, GstEvent * event)
|
||||||
gst_pad_start_task (avi->sinkpad, (GstTaskFunction) gst_avi_demux_loop,
|
gst_pad_start_task (avi->sinkpad, (GstTaskFunction) gst_avi_demux_loop,
|
||||||
avi->sinkpad);
|
avi->sinkpad);
|
||||||
}
|
}
|
||||||
|
/* reset the last flow and mark discont, seek is always DISCONT */
|
||||||
|
for (i = 0; i < avi->num_streams; i++) {
|
||||||
|
GST_DEBUG_OBJECT (avi, "marking DISCONT");
|
||||||
|
avi->stream[i].last_flow = GST_FLOW_OK;
|
||||||
|
avi->stream[i].discont = TRUE;
|
||||||
|
}
|
||||||
GST_PAD_STREAM_UNLOCK (avi->sinkpad);
|
GST_PAD_STREAM_UNLOCK (avi->sinkpad);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue