[FFmpeg-devel] [PATCH 1/6] Return meaningful error codes, rather than always -1.

Stefano Sabatini stefano.sabatini-lala
Mon Apr 26 21:40:58 CEST 2010


On date Monday 2010-04-26 00:06:43 +0200, Luca Abeni encoded:
> On Sun, 2010-04-25 at 20:32 +0200, Stefano Sabatini wrote:
> [...]
> > > > I was unsure between this and EPERM = "Operation not permitted".
> > > >
> > > > EPERM = -1 so it should be safe to just replace -1 with
> > > > AVERROR(EPERM), would that be fine?
> > > 
> > > Not for that reason.  This is certainly not a problem of lack of
> > > permissions.  Capturing from something which is not a capture device
> > > is impossible no matter what permissions you have.  How about ENODEV?
> > 
> > From:
> > http://www.opengroup.org/onlinepubs/000095399/functions/xsh_chap02_03.html
> > 
> > [ENODEV] No such device. An attempt was made to apply an inappropriate
> > function to a device; for example, trying to read a write-only device
> > such as a printer.
> 
> I think ENODEV is the best option, here

Applied.
-- 
FFmpeg = Furious and Fast Monstrous Philosophical Ephemeral Gnome



More information about the ffmpeg-devel mailing list