[FFmpeg-cvslog] avformat/id3v2: use png header to get PNG signature
Paul B Mahol
git at videolan.org
Fri Dec 14 12:36:26 EET 2018
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Dec 14 11:34:46 2018 +0100| [5e6b93bb4dc46a8a2c9e18e58810bdb6a64a1790] | committer: Paul B Mahol
avformat/id3v2: use png header to get PNG signature
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5e6b93bb4dc46a8a2c9e18e58810bdb6a64a1790
---
libavformat/id3v2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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])
More information about the ffmpeg-cvslog
mailing list