diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-02-19 21:02:12 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-03-24 06:13:39 +0100 |
commit | 15c5a8d22d12d29a364ca2ab6438f1dee2fa08c7 (patch) | |
tree | 1062b31f2d61e72918369c6441cb8a737b2aa1f6 /libavformat/mp3dec.c | |
parent | 06c3cd3c0186803619bc6aad2d8f06c3e9015d15 (diff) | |
download | ffmpeg-15c5a8d22d12d29a364ca2ab6438f1dee2fa08c7.tar.gz |
mp3dec: export replaygain tags from ID3v2
Diffstat (limited to 'libavformat/mp3dec.c')
-rw-r--r-- | libavformat/mp3dec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 5c263edca9..414c7e9174 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -27,6 +27,8 @@ #include "internal.h" #include "id3v2.h" #include "id3v1.h" +#include "replaygain.h" + #include "libavcodec/mpegaudiodecheader.h" #define XING_FLAG_FRAMES 0x01 @@ -194,6 +196,7 @@ static int mp3_read_header(AVFormatContext *s) { AVStream *st; int64_t off; + int ret; st = avformat_new_stream(s, NULL); if (!st) @@ -215,6 +218,10 @@ static int mp3_read_header(AVFormatContext *s) if (mp3_parse_vbr_tags(s, st, off) < 0) avio_seek(s->pb, off, SEEK_SET); + ret = ff_replaygain_export(st, s->metadata); + if (ret < 0) + return ret; + /* the parameters will be extracted from the compressed bitstream */ return 0; } |