videoparsers: don't leak event

Unref the event when we don't chain up to the parent
This commit is contained in:
Wim Taymans 2012-02-15 13:02:06 +01:00
parent f9c99b4713
commit 16810321ee
2 changed files with 2 additions and 0 deletions

View file

@ -1806,6 +1806,7 @@ gst_h264_parse_event (GstBaseParse * parse, GstEvent * event)
h264parse->pending_key_unit_ts = running_time;
gst_event_replace (&h264parse->force_key_unit_event, event);
}
gst_event_unref (event);
res = TRUE;
} else {
res = GST_BASE_PARSE_CLASS (parent_class)->event (parse, event);

View file

@ -837,6 +837,7 @@ gst_mpeg4vparse_event (GstBaseParse * parse, GstEvent * event)
mp4vparse->pending_key_unit_ts = running_time;
gst_event_replace (&mp4vparse->force_key_unit_event, event);
}
gst_event_unref (event);
res = TRUE;
} else {
res = GST_BASE_PARSE_CLASS (parent_class)->event (parse, event);