1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/wavdec: add support for 'id3 ' chunk

Fixes #5700.
This commit is contained in:
Paul B Mahol 2018-12-12 19:02:30 +01:00
parent 32601fb821
commit f5aad350d3

View File

@ -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 */