[FFmpeg-devel] [PATCH] examples/muxing: improve error messages.

Stefano Sabatini stefasab at gmail.com
Wed Jan 2 23:58:42 CET 2013


On date Wednesday 2013-01-02 17:47:32 +0100, Nicolas George encoded:
> Le tridi 13 nivôse, an CCXXI, Stefano Sabatini a écrit :
> > LGTM.
> 
> Thanks, pushed.
> 
> > BTW we should avoid to exit() from functions, return an error code
> > instead and do proper cleanup in the calling function (at that point
> > error reporting could be factorized).
> 

> The purpose of the examples is to illustrate the API, not to educate with
> good coding practices, and direct exit() is completely acceptable in quite a
> lot of situations.
> 
> Therefore, eliminating exit() is not a goal in itself: if it makes the code
> simpler and/or more readable, 100% ok. If it does not make the code less
> readable, why not, but there are more urgent issues.

On the other hand I bet that people want to integrate the code into
their programs, so having a modular design will help integration.
-- 
FFmpeg = Frightening and Frightening Martial Prodigious Emblematic Game


More information about the ffmpeg-devel mailing list