[FFmpeg-devel] [PATCH] avformat/aiffdec: parse replaygain metadata

Moritz Barsnick barsnick at gmx.net
Wed Mar 13 11:17:40 EET 2019


Signed-off-by: Moritz Barsnick <barsnick at gmx.net>
---
Tested against sample provided here:
https://ffmpeg.org/pipermail/ffmpeg-user/2019-March/043717.html

 libavformat/aiffdec.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 7c701e0c70..ea2955816a 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -29,6 +29,7 @@
 #include "isom.h"
 #include "id3v2.h"
 #include "mov_chan.h"
+#include "replaygain.h"
 
 #define AIFF                    0
 #define AIFF_C_VERSION1         0xA2805140
@@ -348,6 +349,10 @@ static int aiff_read_header(AVFormatContext *s)
         }
     }
 
+    ret = ff_replaygain_export(st, s->metadata);
+    if (ret < 0)
+        return ret;
+
 got_sound:
     if (!st->codecpar->block_align && st->codecpar->codec_id == AV_CODEC_ID_QCELP) {
         av_log(s, AV_LOG_WARNING, "qcelp without wave chunk, assuming full rate\n");
-- 
2.20.1



More information about the ffmpeg-devel mailing list