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.
This commit is contained in:
Tim-Philipp Müller 2009-06-26 13:19:04 +01:00
parent 2e13b85a01
commit 1fb30a154a

View file

@ -4776,9 +4776,16 @@ qtdemux_tag_add_num (GstQTDemux * qtdemux, const char *tag1,
if (type == 0x00000000 && len >= 22) { if (type == 0x00000000 && len >= 22) {
n1 = QT_UINT16 ((guint8 *) data->data + 18); n1 = QT_UINT16 ((guint8 *) data->data + 18);
n2 = QT_UINT16 ((guint8 *) data->data + 20); n2 = QT_UINT16 ((guint8 *) data->data + 20);
GST_DEBUG_OBJECT (qtdemux, "adding tag %d/%d", n1, n2); if (n1 > 0) {
GST_DEBUG_OBJECT (qtdemux, "adding tag %s=%d", tag1, n1);
gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE, gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE,
tag1, n1, tag2, n2, NULL); 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);
}
} }
} }
} }