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

Michael Niedermayer michaelni
Thu Mar 18 03:41:20 CET 2010


On Thu, Mar 18, 2010 at 01:49:11AM +0100, Stefano Sabatini wrote:
> 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.

I think i prefer AVERROR_INVALIDDATA, in the sense that 
the data is invalid within what the specific libav* binary supports

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100318/9eb1aefd/attachment.pgp>



More information about the ffmpeg-devel mailing list