From cd018e544037b3898c1e8cac610aa71fce9d6abd Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 15 Jun 2010 11:16:47 +0200 Subject: [PATCH] mpeg4videoparse: handle FLUSH_STOP event --- gst/mpeg4videoparse/mpeg4videoparse.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gst/mpeg4videoparse/mpeg4videoparse.c b/gst/mpeg4videoparse/mpeg4videoparse.c index c0c124e5a2..e13f82ddc7 100644 --- a/gst/mpeg4videoparse/mpeg4videoparse.c +++ b/gst/mpeg4videoparse/mpeg4videoparse.c @@ -777,6 +777,12 @@ gst_mpeg4vparse_sink_event (GstPad * pad, GstEvent * event) GST_EVENT_TYPE_NAME (event)); switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_FLUSH_STOP: + parse->last_report = GST_CLOCK_TIME_NONE; + gst_adapter_clear (parse->adapter); + parse->state = PARSE_NEED_START; + parse->offset = 0; + break; case GST_EVENT_EOS: if (parse->state == PARSE_VOP_FOUND) { /* If we've found the start of the VOP assume what's left in the @@ -787,10 +793,10 @@ gst_mpeg4vparse_sink_event (GstPad * pad, GstEvent * event) } /* fallthrough */ default: - res = gst_pad_event_default (pad, event); break; } + res = gst_pad_event_default (pad, event); gst_object_unref (parse); return res;