diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-12-12 19:02:30 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-12-13 10:01:15 +0100 |
commit | f5aad350d3695b5b16e7d135154a4c61e4dce9d8 (patch) | |
tree | 6bf86c43883cb815c9ee8f73dcc2178dbee928a5 | |
parent | 32601fb82117533ed93c67993c1dc0cd872d0360 (diff) | |
download | ffmpeg-f5aad350d3695b5b16e7d135154a4c61e4dce9d8.tar.gz |
avformat/wavdec: add support for 'id3 ' chunk
Fixes #5700.
-rw-r--r-- | libavformat/wavdec.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index e280be4d44..6a024de683 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -34,6 +34,7 @@ #include "avformat.h" #include "avio.h" #include "avio_internal.h" +#include "id3v2.h" #include "internal.h" #include "metadata.h" #include "pcm.h" @@ -500,6 +501,18 @@ static int wav_read_header(AVFormatContext *s) ff_read_riff_info(s, size - 4); } break; + case MKTAG('I', 'D', '3', ' '): + case MKTAG('i', 'd', '3', ' '): { + ID3v2ExtraMeta *id3v2_extra_meta = NULL; + ff_id3v2_read_dict(pb, &s->internal->id3v2_meta, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta); + if (id3v2_extra_meta) { + ff_id3v2_parse_apic(s, &id3v2_extra_meta); + ff_id3v2_parse_chapters(s, &id3v2_extra_meta); + ff_id3v2_parse_priv(s, &id3v2_extra_meta); + } + ff_id3v2_free_extra_meta(&id3v2_extra_meta); + } + break; } /* seek to next tag unless we know that we'll run into EOF */ |