[FFmpeg-devel] [PATCH] avformat/wavdec: allow data chunk to be before fmt/xma2 chunk

Paul B Mahol onemda at gmail.com
Sun Nov 8 12:34:21 CET 2015


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

diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 621d21f..144e1b7 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -379,7 +379,7 @@ static int wav_read_header(AVFormatContext *s)
             got_xma2 = 1;
             break;
         case MKTAG('d', 'a', 't', 'a'):
-            if (!got_fmt && !got_xma2) {
+            if (!pb->seekable && !got_fmt && !got_xma2) {
                 av_log(s, AV_LOG_ERROR,
                        "found no 'fmt ' tag before the 'data' tag\n");
                 return AVERROR_INVALIDDATA;
-- 
1.9.1



More information about the ffmpeg-devel mailing list