From bc6a9327f47438bb3598ba8c4f5e9b8b1db8385d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 14 Jan 2017 15:05:36 +0000 Subject: [PATCH] flacenc: also set PICTURE tag width and height if available --- ext/flac/gstflacenc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c index 785dfc4512..8a5ec78d09 100644 --- a/ext/flac/gstflacenc.c +++ b/ext/flac/gstflacenc.c @@ -683,6 +683,11 @@ gst_flac_enc_set_metadata (GstFlacEnc * flacenc, GstAudioInfo * info, GST_LOG_OBJECT (flacenc, "Setting picture type %d", image_type); flacenc->meta[entries]->data.picture.type = image_type; + if (width > 0 && height > 0) { + flacenc->meta[entries]->data.picture.width = width; + flacenc->meta[entries]->data.picture.height = height; + } + FLAC__metadata_object_picture_set_mime_type (flacenc->meta[entries], (char *) gst_structure_get_name (structure), TRUE);