[FFmpeg-devel] [PATCH] Make av_open_input_file() return AVERROR_NOTSUPP rather than AV_NOFMT if the format is unknown / cannot be recognized.

Stefano Sabatini stefano.sabatini-lala
Thu Mar 18 01:49:11 CET 2010


On date Wednesday 2010-03-17 15:51:57 +0100, Michael Niedermayer encoded:
> On Wed, Mar 17, 2010 at 12:58:17AM +0100, Stefano Sabatini wrote:
> > Hi, $subj.
> > -- 
> > FFmpeg = Free & Foolish Mastering Peaceful Embarassing Genius
> 
> >  utils.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 88370bd8e6975ccca60dd9b8f0c4d3ecb716c23a  0010-Make-av_open_input_file-return-AVERROR_NOTSUPP-rathe.patch
> > >From 62564d9e6a5ec8be552cc94de6e50662c85bb7ff Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> > Date: Wed, 17 Mar 2010 00:36:45 +0100
> > Subject: [PATCH 10/15] Make av_open_input_file() return AVERROR_NOTSUPP rather than AV_NOFMT
> >  if the format is unknonw / cannot be recognized.
> > 
> > That was the only use of AVERROR_NOFMT, which is going to be dropped.
> 
> rejected
> with this the semantics are really wrong
> not supported implicates supportable, random undetected data is not
> neccesarily supportable

The other idea was to use AVERROR_INVALIDDATA, but this too may not be
correct as the format could be simply not supported by FFmpeg.

And we can consider bogus random data as something which is simply
"not supported" by FFmpeg, although I recognize this is a somehow
stretched interpretation.

The other possibility is to keep AVERROR_NOFMT (even if this would be
the only use in FFmpeg).

Regards.
-- 
FFmpeg = Friendly & Friendly Multimedia Philosophical Elitarian Generator



More information about the ffmpeg-devel mailing list