summaryrefslogtreecommitdiff
path: root/libavformat/mp3dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-24 15:11:08 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-24 15:11:08 +0100
commit1034fbdf53003eb74ad30576d1f2205abc429357 (patch)
treebab68afb4da4a0f38228a697f158812f04706c5c /libavformat/mp3dec.c
parent8de75f703adafced474ddf748c46d091ee0a8f4a (diff)
parent15c5a8d22d12d29a364ca2ab6438f1dee2fa08c7 (diff)
Merge commit '15c5a8d22d12d29a364ca2ab6438f1dee2fa08c7'
* commit '15c5a8d22d12d29a364ca2ab6438f1dee2fa08c7': mp3dec: export replaygain tags from ID3v2 Conflicts: Changelog Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mp3dec.c')
-rw-r--r--libavformat/mp3dec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index ba77bce238..c2b3467bf4 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -28,6 +28,8 @@
#include "internal.h"
#include "id3v2.h"
#include "id3v1.h"
+#include "replaygain.h"
+
#include "libavcodec/mpegaudiodecheader.h"
#define XING_FLAG_FRAMES 0x01
@@ -209,6 +211,7 @@ static int mp3_read_header(AVFormatContext *s)
MP3DecContext *mp3 = s->priv_data;
AVStream *st;
int64_t off;
+ int ret;
st = avformat_new_stream(s, NULL);
if (!st)
@@ -234,6 +237,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;
}