[FFmpeg-cvslog] riff: do not add empty metadata tags in INFO chunk

Justin Ruggles git at videolan.org
Tue Nov 27 14:36:11 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Nov 25 12:40:54 2012 -0500| [259d8c5647417da02aed3081f8442c734988bbf3] | committer: Justin Ruggles

riff: do not add empty metadata tags in INFO chunk

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=259d8c5647417da02aed3081f8442c734988bbf3
---

 libavformat/riff.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 7313092..190504c 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -734,6 +734,12 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
 
         chunk_size += (chunk_size & 1);
 
+        if (!chunk_code) {
+            if (chunk_size)
+                avio_skip(pb, chunk_size);
+            continue;
+        }
+
         value = av_malloc(chunk_size + 1);
         if (!value) {
             av_log(s, AV_LOG_ERROR, "out of memory, unable to read INFO tag\n");



More information about the ffmpeg-cvslog mailing list