mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
mpeg4videoparse: handle FLUSH_STOP event
This commit is contained in:
parent
c2b649d692
commit
cd018e5440
1 changed files with 7 additions and 1 deletions
|
@ -777,6 +777,12 @@ gst_mpeg4vparse_sink_event (GstPad * pad, GstEvent * event)
|
||||||
GST_EVENT_TYPE_NAME (event));
|
GST_EVENT_TYPE_NAME (event));
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (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:
|
case GST_EVENT_EOS:
|
||||||
if (parse->state == PARSE_VOP_FOUND) {
|
if (parse->state == PARSE_VOP_FOUND) {
|
||||||
/* If we've found the start of the VOP assume what's left in the
|
/* 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 */
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
res = gst_pad_event_default (pad, event);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
res = gst_pad_event_default (pad, event);
|
||||||
gst_object_unref (parse);
|
gst_object_unref (parse);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in a new issue