On Fri, 26 Jul 2013 16:35:24 +0200
Luca Barbato <[email protected]> wrote:

> > It's a bit strange that a libav error code can be a libc error code in
> > the first place.
> 
> I'm afraid you aren't considering how the error handling exactly works.
> 
> You have to forward the errors from the source up to the user.

Most time, these error numbers are relatively useless, especially
because you don't know by which OS-level call they were returned. Most
time libav error codes don't do very precise reporting anyway (usually
exact error reasons are reported via av_log), so I don't see the point
of returning OS level errors exactly.

How do you even make sure the libav specific error codes don't clash
with the libc ones? What if code is using a library that does not
return errno-compatible error codes? (I've seen that for winsock
they're translated manually.)

> When you are using a libavdevice you might get quite os-specific errors
> forwarded, when you are sending some packet using a network protocol,
> the network specific errors get forwarded and so on and so forth.

I'm sure for these very specific cases, a different way to pass along
the OS error codes could be introduced.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to