On Mon, Apr 21, 2025 at 10:01 AM Nicolas George <[email protected]> wrote:
> Thierry Foucu (HE12025-04-21):
> > > >> - avio_read(pb, md5, 16);
> > > >> + if (avio_read(pb, md5, 16) != 16) {
> > > >> + return AVERROR(EIO);
> > > Should be AVERROR_INVALIDDATA imo, since i means the file is just
> > > truncated. It wasn't an error in the protocol reading data.
> > Regarding the error message, I was trying to be consistent with the other
> > avio_read error, like here:
> > https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/takdec.c#L99
>
> Both codes are wrong: if avio_read() returns an error, it must be
> returned as is, not a new error invented.
>
> And if avio_read() returns less than requested, then I agree with James,
> INVALID_DATA is more correct than EIO. In both places.
>
Thanks. This is good to know..
>
> Regards,
>
> --
> Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> [email protected]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> [email protected] with subject "unsubscribe".
>
--
Thierry Foucu
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".