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:
Wim Taymans 2010-01-20 11:26:34 +01:00
parent 183d450113
commit 40e3b0189a

View file

@ -771,6 +771,18 @@ gst_avi_demux_handle_sink_event (GstPad * pad, GstEvent * event)
} }
break; 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: default:
res = gst_pad_event_default (pad, event); res = gst_pad_event_default (pad, event);
break; break;