[FFmpeg-devel] perror() in libav*?
Fri Nov 16 03:43:06 CET 2007
On Thu, Nov 15, 2007 at 02:02:22PM +0100, Luca Abeni wrote:
> Hi all,
> I recently noticed that some code in libavformat and libavcodec
> calls perror() on errors. I assume this is not good, and such
> code should be fixed, right?
> I see two possibilities:
> 1) replace perror() with a proper call to av_log() (maybe using
> AV_LOG_WARNING instead of AV_LOG_ERROR?)
> 2) just remove all the references to perror() and return an error
> code (the calling application will be in charge of printing
> The third possibility is to leave everything as is is now ;-)
> What do other people think?
2. sounds like a seperate issue which may be good in some cases as well
but as said its seperate and unrelated to perror() vs. av_log()
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel