aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2014-04-04 11:50:45 +0200
committerAnton Khirnov <anton@khirnov.net>2014-04-04 17:40:51 +0200
commit1d55f8d5f6f2cd74fa27170e2be37a72441d9202 (patch)
tree178b763b0c9f726c817d7f5b55c8f2598b27f18f /libavformat
parent8542f9c4f17125d483c40c0c5723842f1c982f81 (diff)
downloadffmpeg-1d55f8d5f6f2cd74fa27170e2be37a72441d9202.tar.gz
flacdec: export replaygain tags from Vorbis comments
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/Makefile1
-rw-r--r--libavformat/flacdec.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 5e1f948e0b..8be9e2d9ad 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -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
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index ecbb7ec0ef..11360a9da1 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -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;
}