[MPlayer-dev-eng] [PATCH] libbs2b audio filter

Uoti Urpala uoti.urpala at pp1.inet.fi
Sat Mar 28 04:49:15 CET 2009


On Sat, 2009-03-28 at 06:21 +0300, Andrew Savchenko wrote:
> I admit, in rare cases goto is a good solution, but not it this 
> one. Please note: cleanups with all sanity checks are already 
> implemented as uninit functions. So IMO the best solution in 
> particular case of libaf will be to call uninit function if an 
> appropriate error code from af_open is returned. Perhaps the best 
> choise for return code will be AF_FATAL due to severe nature of 
> memory allocation problems. However, special code of mask like 
> AF_CLEANUP may be introduced.

Add a special return value to the API that at best avoids a single line
of additional code when it's used? I think that's clearly a bad
tradeoff. If the filter wants uninit() called then it can call that
itself before returning.




More information about the MPlayer-dev-eng mailing list