[FFmpeg-devel] [PATCH] avformat/matroskadec: return AVERROR(EIO) rather than AVERROR_EOF on parse error

Nicolas George george at nsup.org
Sun Jul 31 20:26:13 EEST 2016


Le quartidi 14 thermidor, an CCXXIV, Sophia Wang a écrit :
> Since matroska->done is only set to 1 in matroska_resync(), the choice
> of error is made by checking the return value of matroska_resync()
> rather than checking matroska->done directly on the next
> while-iteration.

This is not what your code do:

> +            if (matroska_resync(matroska, pos) < 0)
> +                return avio_feof(s->pb) ? AVERROR_EOF : AVERROR(EIO);

It checks the return value of matroska_resync() and then invents a
completely unrelated error code.

What it should do is use the error code from matroska_resync(). As simple as
that.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160731/b654563b/attachment.sig>


More information about the ffmpeg-devel mailing list