diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-03-13 11:33:53 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-03-15 10:39:18 +0300 |
commit | c5ad081b92ad2008f35f666734084d4639ba5aaa (patch) | |
tree | 857478a43b0917de6faace8fed03b5e0ef22e342 | |
parent | a2a914a314bcec49c07ffd8cddd2277cea1f65ef (diff) |
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
-rw-r--r-- | libs/gst/base/gstbaseparse.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index c6c43f0d46..d5aea55d90 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -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; |