[FFmpeg-devel] [PATCH] lavf: return AVERROR_EOF rather than EIO on EOF

Anton Khirnov anton at khirnov.net
Mon Mar 27 22:22:38 EEST 2023


Quoting Marton Balint (2023-03-27 21:08:54)
> 
> 
> On Mon, 27 Mar 2023, Marton Balint wrote:
> 
> >
> >
> > On Mon, 27 Mar 2023, Anton Khirnov wrote:
> >
> >>  ---
> >>  libavformat/anm.c          | 2 +-
> >>  libavformat/dauddec.c      | 2 +-
> >>  libavformat/filmstripdec.c | 2 +-
> >>  libavformat/idroqdec.c     | 2 +-
> >>  libavformat/sol.c          | 3 ++-
> >>  libavformat/vc1test.c      | 2 +-
> >>  6 files changed, 7 insertions(+), 6 deletions(-)
> >
> > Aren't these supposed to return AVERROR_INVALIDDATA? Beacuse these are most 
> > likely premature EOF-s when the file is truncated.
> 
> Disregard my comment, I can see now that these are all in the 
> beginning of read_packet().

Yeah, I picked just those where it was clear that it's an actual EOF.
There's a bunch of other EIO uses left that should probably be
INVALIDDATA, watches pelcome.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list