summaryrefslogtreecommitdiffstats
path: root/gst/qtdemux
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-06-26 13:19:04 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-06-26 13:29:27 +0100
commit1fb30a154a1dc9f101f5a7e5f4ab2b820c13487c (patch)
tree1814b58cea083bc6e99c03c5bbd60ed78818a804 /gst/qtdemux
parent2e13b85a016330729a3c6ac39d006d06fc1db996 (diff)
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.
Diffstat (limited to 'gst/qtdemux')
-rw-r--r--gst/qtdemux/qtdemux.c13
1 files changed, 10 insertions, 3 deletions
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);
+ }
}
}
}