Commit 1fb30a15 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

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.
parent 2e13b85a
......@@ -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);
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment