[FFmpeg-devel] [PATCH] Replace ENOSYS by ENOTSUP

Ramiro Ribeiro Polla ramiro
Wed Aug 15 21:34:25 CEST 2007


Michael Niedermayer wrote:
> Hi
>
> On Tue, Aug 14, 2007 at 02:43:18PM +0200, Fran?ois Revol wrote:
> [...]
>   
>>> seriously the E* stuff is starting to turn into a nightmare ...
>>>
>>> at minimum someone should make a list of what E* are available on 
>>> mingw
>>> beos, freebsd and macosx
>>> so that we can check added E* against that list and dont notice after
>>> commit that they arent available ...
>>>
>>>       

I'll send the list for MinGW once I get time.

>>> we could also forget the whole idea of using standard error codes as 
>>> it
>>> seems the few which are supported everywhere are pretty much 
>>> insufficient
>>> for an application beyond "hello world"
>>>       
>> Then we/apps'll need our own strerror, have to localize them, ...
>> I don't really care though. Just mixing both isn't clean at all.
>>     
>
> i disgagree, mixing both is the best option
>
> lets see:
>                standard E           mix                 only ours
> std E error    localized strerr()   localized strerr()  nothing directly
> non std E err  random error msg     strerr() fail       nothing directly
>
> from this its clear that mix is better than just returning standard E*
> as the pure standard E* will always end in incorrect error codes and error
> messages if none of the available E* is applicable
>
> the "nothing directly" and "strerr() fail" cases can of course be
> covered by a av_strerr() if anyone cares but simply calling strerror()
> from av_strerror() is not acceptable as it modifies the result of past
> strerror()
>
>   

What do you think about #ifdef'ing the definition of AVERROR_*? User 
apps will always have to check for AVERROR_*, instead of AVERROR(*), and 
will get an strerror() string on systems that have that error. Attached 
patch is an example of this.

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: averror_notsup.diff
Type: text/x-patch
Size: 602 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070815/962f4e92/attachment.bin>



More information about the ffmpeg-devel mailing list