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

Michael Niedermayer michael at niedermayer.cc
Mon Nov 9 22:56:16 CET 2015


On Sun, Nov 08, 2015 at 12:34:21PM +0100, Paul B Mahol wrote:
> 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;

if fmt/xma2 existence isnt checked at data time then i think it should
be checked at the end of the loop unless iam missing somethig

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151109/4bcae8b9/attachment.sig>


More information about the ffmpeg-devel mailing list