[FFmpeg-devel] [PATCH v1] avformat/wavdec.c: copy id3 metadata to format metadata and stream side data
Jun Li
junli1026 at gmail.com
Sun Oct 20 08:33:55 EEST 2019
Enhancement #7803
Copy id3 metadata to format meta data and steams side data.
Signed-off-by: Jun Li <junli1026 at gmail.com>
---
libavformat/wavdec.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 52194f54ef..d82bdaaa66 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -41,6 +41,7 @@
#include "riff.h"
#include "w64.h"
#include "spdif.h"
+#include "replaygain.h"
typedef struct WAVDemuxContext {
const AVClass *class;
@@ -537,6 +538,15 @@ break_loop:
avio_seek(pb, data_ofs, SEEK_SET);
+ if (s->internal->id3v2_meta) {
+ ret = av_dict_copy(&s->metadata, s->internal->id3v2_meta, 0);
+ if (ret < 0)
+ return ret;
+ ret = ff_replaygain_export(st, s->internal->id3v2_meta);
+ if (ret < 0)
+ return ret;
+ }
+
if (data_size > (INT64_MAX>>3)) {
av_log(s, AV_LOG_WARNING, "Data size %"PRId64" is too large\n", data_size);
data_size = 0;
--
2.17.1
More information about the ffmpeg-devel
mailing list