From 1fb30a154a1dc9f101f5a7e5f4ab2b820c13487c Mon Sep 17 00:00:00 2001 From: Tim-Philipp Müller Date: Fri, 26 Jun 2009 13:19:04 +0100 Subject: qtdemux: don't process track_num/track_count tags with a 0 value Number/count values of 0 mean they're not set. Don't put those in the taglist. --- gst/qtdemux/qtdemux.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gst/qtdemux') diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index 7fe7c2a2..d09cb6f9 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -4776,9 +4776,16 @@ qtdemux_tag_add_num (GstQTDemux * qtdemux, const char *tag1, if (type == 0x00000000 && len >= 22) { n1 = QT_UINT16 ((guint8 *) data->data + 18); n2 = QT_UINT16 ((guint8 *) data->data + 20); - GST_DEBUG_OBJECT (qtdemux, "adding tag %d/%d", n1, n2); - gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, - tag1, n1, tag2, n2, NULL); + if (n1 > 0) { + GST_DEBUG_OBJECT (qtdemux, "adding tag %s=%d", tag1, n1); + gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, + tag1, n1, NULL); + } + if (n2 > 0) { + GST_DEBUG_OBJECT (qtdemux, "adding tag %s=%d", tag2, n2); + gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, + tag2, n2, NULL); + } } } } -- cgit