summaryrefslogtreecommitdiff
path: root/libavformat/id3v2.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-18 18:37:39 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-18 18:38:53 +0200
commit622f1468c92cb399e824894aa456d5590da6cc56 (patch)
treef8dfcdda7602b28e5e86a141dd1cb1817bf6cf7b /libavformat/id3v2.c
parent57078e4d255a06246fef27846073f5ffb312b5dc (diff)
avformat/id3v2: detect PNG by header instead of mime
the mimetype for PNG can be set to jpeg Fixes 01\ -\ Cider\ Time.mp3 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r--libavformat/id3v2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 2289bfc15a..52d85312e4 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -1083,6 +1083,9 @@ int ff_id3v2_parse_apic(AVFormatContext *s, ID3v2ExtraMeta **extra_meta)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = apic->id;
+ if (AV_RB64(apic->buf->data) == 0x89504e470d0a1a0a)
+ st->codec->codec_id = AV_CODEC_ID_PNG;
+
if (apic->description[0])
av_dict_set(&st->metadata, "title", apic->description, 0);