mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
qtdemux: boldly assume that first 'covr' image is the front cover
This commit is contained in:
parent
59fd44a56f
commit
5404304fac
1 changed files with 8 additions and 1 deletions
|
@ -12113,9 +12113,16 @@ qtdemux_tag_add_covr (GstQTDemux * qtdemux, GstTagList * taglist,
|
||||||
type = QT_UINT32 ((guint8 *) data->data + 8);
|
type = QT_UINT32 ((guint8 *) data->data + 8);
|
||||||
GST_DEBUG_OBJECT (qtdemux, "have covr tag, type=%d,len=%d", type, len);
|
GST_DEBUG_OBJECT (qtdemux, "have covr tag, type=%d,len=%d", type, len);
|
||||||
if ((type == 0x0000000d || type == 0x0000000e) && len > 16) {
|
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 =
|
if ((sample =
|
||||||
gst_tag_image_data_to_image_sample ((guint8 *) data->data + 16,
|
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_DEBUG_OBJECT (qtdemux, "adding tag size %d", len - 16);
|
||||||
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag1, sample, NULL);
|
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, tag1, sample, NULL);
|
||||||
gst_sample_unref (sample);
|
gst_sample_unref (sample);
|
||||||
|
|
Loading…
Reference in a new issue