aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-12-14 11:34:46 +0100
committerPaul B Mahol <onemda@gmail.com>2018-12-14 11:34:46 +0100
commit5e6b93bb4dc46a8a2c9e18e58810bdb6a64a1790 (patch)
tree27edb8196a29afbc977eb16fa0dfbefbbaed0d6a
parente9817636a7e132129fee0c34e05f224da14c5200 (diff)
downloadffmpeg-5e6b93bb4dc46a8a2c9e18e58810bdb6a64a1790.tar.gz
avformat/id3v2: use png header to get PNG signature
-rw-r--r--libavformat/id3v2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index f7de26a1d8..bb5c3f8119 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -36,6 +36,7 @@
#include "libavutil/bprint.h"
#include "libavutil/dict.h"
#include "libavutil/intreadwrite.h"
+#include "libavcodec/png.h"
#include "avio_internal.h"
#include "internal.h"
#include "id3v1.h"
@@ -1156,7 +1157,7 @@ int ff_id3v2_parse_apic(AVFormatContext *s, ID3v2ExtraMeta **extra_meta)
st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
st->codecpar->codec_id = apic->id;
- if (AV_RB64(apic->buf->data) == 0x89504e470d0a1a0a)
+ if (AV_RB64(apic->buf->data) == PNGSIG)
st->codecpar->codec_id = AV_CODEC_ID_PNG;
if (apic->description[0])