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

Nicolas George george at nsup.org
Tue Aug 2 17:33:52 EEST 2016


Le quintidi 15 thermidor, an CCXXIV, Sophia Wang a écrit :
> Thanks for the quick response. matroska_resync() is currently written to
> only return AVERROR_EOF, so using that error code directly wouldn't be any
> more informative. But your suggestion would work if matroska_resync() kept
> the error code returned by avio_seek(). Would such a change warrant
> splitting into a separate patch?

It is all the same issue of callers discarding the return code of called
functions and then inventing a new one. It happens all over the place in
this demuxer, and a recent commit by Carl Eugen shows it also happens in the
rm demuxer. I think is is a remnant of the time before the AVERROR codes.

You are of course not required to fix all the instances of the issue,
especially when testing is not convenient, but I think fixing any number of
them can belong in the same patch, especially if they all serve to fix a
particular visible instance.

Note that I am not maintainer of the Matroska code, though.

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/20160802/7278b027/attachment.sig>


More information about the ffmpeg-devel mailing list