mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
avidemux: reset on flush events
When we receive a flush event on the sinkpad, reset the EOS state and the flowreturn of all streams. Also mark the streams with a DISCONT.
This commit is contained in:
parent
183d450113
commit
40e3b0189a
1 changed files with 12 additions and 0 deletions
|
@ -771,6 +771,18 @@ gst_avi_demux_handle_sink_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
{
|
||||
gint i;
|
||||
|
||||
gst_adapter_clear (avi->adapter);
|
||||
avi->have_eos = FALSE;
|
||||
for (i = 0; i < avi->num_streams; i++) {
|
||||
avi->stream[i].last_flow = GST_FLOW_OK;
|
||||
avi->stream[i].discont = TRUE;
|
||||
}
|
||||
/* fall through to default case so that the event gets passed downstream */
|
||||
}
|
||||
default:
|
||||
res = gst_pad_event_default (pad, event);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue