[FFmpeg-devel] [PATCH] avformat/matroskadec: return AVERROR(EIO) rather than AVERROR_EOF on parse error
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: Digital signature
More information about the ffmpeg-devel