flacdec: export replaygain tags from Vorbis comments
authorAlessandro Ghedini <alessandro@ghedini.me>
Fri, 4 Apr 2014 09:50:45 +0000 (11:50 +0200)
committerAnton Khirnov <anton@khirnov.net>
Fri, 4 Apr 2014 15:40:51 +0000 (17:40 +0200)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat/Makefile
libavformat/flacdec.c

index 5e1f948..8be9e2d 100644 (file)
@@ -116,6 +116,7 @@ OBJS-$(CONFIG_FILMSTRIP_MUXER)           += filmstripenc.o
 OBJS-$(CONFIG_FLAC_DEMUXER)              += flacdec.o rawdec.o \
                                             flac_picture.o   \
                                             oggparsevorbis.o \
+                                            replaygain.o     \
                                             vorbiscomment.o
 OBJS-$(CONFIG_FLAC_MUXER)                += flacenc.o flacenc_header.o \
                                             vorbiscomment.o
index ecbb7ec..11360a9 100644 (file)
@@ -26,6 +26,7 @@
 #include "rawdec.h"
 #include "oggdec.h"
 #include "vorbiscomment.h"
+#include "replaygain.h"
 #include "libavcodec/bytestream.h"
 
 static int flac_read_header(AVFormatContext *s)
@@ -146,6 +147,10 @@ static int flac_read_header(AVFormatContext *s)
         }
     }
 
+    ret = ff_replaygain_export(st, s->metadata);
+    if (ret < 0)
+        return ret;
+
     return 0;
 }