[FFmpeg-cvslog] avformat/wavdec: allow data chunk to be before fmt/xma2 chunk
Paul B Mahol
git at videolan.org
Tue Nov 10 19:43:11 CET 2015
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Nov 8 12:27:42 2015 +0100| [4e583eda5f5c334fe60d5628c805c3d197f35bc2] | committer: Paul B Mahol
avformat/wavdec: allow data chunk to be before fmt/xma2 chunk
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e583eda5f5c334fe60d5628c805c3d197f35bc2
---
libavformat/wavdec.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 4190fc6..d95596f 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;
@@ -474,6 +474,11 @@ static int wav_read_header(AVFormatContext *s)
}
break_loop:
+ if (!got_fmt && !got_xma2) {
+ av_log(s, AV_LOG_ERROR, "no 'fmt ' or 'XMA2' tag found\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (data_ofs < 0) {
av_log(s, AV_LOG_ERROR, "no 'data' tag found\n");
return AVERROR_INVALIDDATA;
More information about the ffmpeg-cvslog
mailing list