[MPlayer-dev-eng] [PATCH] ao_macosx clean up code for init failing

Ulion ulion2002 at gmail.com
Sun Dec 2 00:31:50 CET 2007


2007/12/2, Chris Roccati <roccati at pobox.com>:
> On 1 Dec 2007, at 10:36 , Ulion wrote:
> > To prevent from leaking when init fails, here's clean up patch for it.
> > If no objections, commit in 3 days.
>
> It makes sense.
>
> I've never added the extra code in the error branch because of the
> fact that a failure is indication of something so tragical that it's
> unlikely that the application will be able to go on; yet still, from
> a stylistic point of view the cleanup in case of failure is a good idea.

Indeed, now, if ao_macosx not work, mplayer will fallback to openal.
And an user on irc ask me to remove variable aoIsCreated
from init code because it's useless. I said it's still useful when init fails,
after add init clean up code, I can safely remove it :)

-- 
Ulion



More information about the MPlayer-dev-eng mailing list