[FFmpeg-devel] [PATCH] wavdec: make it possible to continue decoding if invalid tags are detected

Paul B Mahol onemda at gmail.com
Thu Oct 18 01:04:47 CEST 2012


Fixes #1821.

Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavformat/wavdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 7a54b1b..a945547 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -346,7 +346,8 @@ static int wav_read_header(AVFormatContext *s)
             }
             switch (avio_rl32(pb)) {
             case MKTAG('I', 'N', 'F', 'O'):
-                if ((ret = ff_read_riff_info(s, size - 4)) < 0)
+                if ((ret = ff_read_riff_info(s, size - 4)) < 0 &&
+                     s->error_recognition & AV_EF_COMPLIANT)
                     return ret;
             }
             break;
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list