Commit 5404304f authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

qtdemux: boldly assume that first 'covr' image is the front cover

parent 59fd44a5
......@@ -12113,9 +12113,16 @@ qtdemux_tag_add_covr (GstQTDemux * qtdemux, GstTagList * taglist,
type = QT_UINT32 ((guint8 *) data->data + 8);
GST_DEBUG_OBJECT (qtdemux, "have covr tag, type=%d,len=%d", type, len);
if ((type == 0x0000000d || type == 0x0000000e) && len > 16) {
GstTagImageType image_type;
if (gst_tag_list_get_tag_size (taglist, GST_TAG_IMAGE) == 0)
image_type = GST_TAG_IMAGE_TYPE_FRONT_COVER;
else
image_type = GST_TAG_IMAGE_TYPE_NONE;
if ((sample =
gst_tag_image_data_to_image_sample ((guint8 *) data->data + 16,
len - 16, GST_TAG_IMAGE_TYPE_NONE))) {
len - 16, image_type))) {
GST_DEBUG_OBJECT (qtdemux, "adding tag size %d", len - 16);
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag1, sample, NULL);
gst_sample_unref (sample);
......
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