diff options
author | Edward Hervey <bilboed@bilboed.com> | 2010-09-22 12:56:00 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2010-09-22 12:56:39 +0200 |
commit | 6ce6ad41d5153300f95945c3a5f1ee41aa0029c3 (patch) | |
tree | e0f193f2e5a6aef5aee4e8653d88d9b655d1bc42 | |
parent | f5c65a919fc4f8bf90c0c7720c92a7471a454e6c (diff) |
qtdemux: Don't post tags if there are none
And make all code go through _post_global_tags.
-rw-r--r-- | gst/qtdemux/qtdemux.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index fcf833b96..ffac66aba 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -1721,13 +1721,15 @@ gst_qtdemux_change_state (GstElement * element, GstStateChange transition) static void qtdemux_post_global_tags (GstQTDemux * qtdemux) { - /* all header tags ready and parsed, push them */ - GST_INFO_OBJECT (qtdemux, "posting global tags: %" GST_PTR_FORMAT, - qtdemux->tag_list); - /* post now, send event on pads later */ - gst_element_post_message (GST_ELEMENT (qtdemux), - gst_message_new_tag (GST_OBJECT (qtdemux), - gst_tag_list_copy (qtdemux->tag_list))); + if (qtdemux->tag_list) { + /* all header tags ready and parsed, push them */ + GST_INFO_OBJECT (qtdemux, "posting global tags: %" GST_PTR_FORMAT, + qtdemux->tag_list); + /* post now, send event on pads later */ + gst_element_post_message (GST_ELEMENT (qtdemux), + gst_message_new_tag (GST_OBJECT (qtdemux), + gst_tag_list_copy (qtdemux->tag_list))); + } } static void @@ -7370,13 +7372,7 @@ qtdemux_parse_tree (GstQTDemux * qtdemux) if (qtdemux->n_streams == 1 && qtdemux->streams[0]->redirect_uri != NULL) { GstMessage *m; - /* Post tags now as there is probably no data on this stream */ - GST_INFO_OBJECT (qtdemux, "posting global tags: %" GST_PTR_FORMAT, - qtdemux->tag_list); - /* post now, send event on pads later */ - gst_element_post_message (GST_ELEMENT (qtdemux), - gst_message_new_tag (GST_OBJECT (qtdemux), - gst_tag_list_copy (qtdemux->tag_list))); + qtdemux_post_global_tags (qtdemux); GST_INFO_OBJECT (qtdemux, "Issuing a redirect due to a single track with " "an external content"); |