baseparse: Recheck after pre_push_frame() if there are tags pending

Many parsers are storing tags only in pre_push_frame(), if we wouldn't check
afterwards we would push buffers before those tags and a lot of code assumes that
tags are available before preroll.

https://bugzilla.gnome.org/show_bug.cgi?id=763553
This commit is contained in:
Sebastian Dröge 2016-03-13 10:33:53 +02:00
parent a2a914a314
commit c5ad081b92

View file

@ -2350,6 +2350,14 @@ gst_base_parse_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
frame->flags |= GST_BASE_PARSE_FRAME_FLAG_CLIP;
}
/* Push pending events, if there are any new ones
* like tags added by pre_push_frame */
if (parse->priv->tags_changed) {
gst_base_parse_queue_tag_event_update (parse);
parse->priv->tags_changed = FALSE;
}
gst_base_parse_push_pending_events (parse);
/* take final ownership of frame buffer */
if (frame->out_buffer) {
buffer = frame->out_buffer;