Merge commit '6e5cdf26281945ddea3aaf5eca4d127791f23ca8'
[ffmpeg.git] / libavformat / riff.c
index 6845466..5ad0eb0 100644 (file)
@@ -837,6 +837,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_mallocz(chunk_size + 1);
         if (!value) {
             av_log(s, AV_LOG_ERROR, "out of memory, unable to read INFO tag\n");