[MPlayer-dev-eng] [PATCH] Get rid of the "main" label

Clément Bœsch ubitux at gmail.com
Wed Jan 12 22:39:29 CET 2011


On Sat, Jan 08, 2011 at 10:40:30PM +0100, Reimar Döffinger wrote:
> On 8 Jan 2011, at 18:50, Clément Bœsch <ubitux at gmail.com> wrote:
> > On Sat, Jan 08, 2011 at 05:41:38PM +0100, Reimar Döffinger wrote:
> >> On 25 Dec 2010, at 17:29, Clément Bœsch <ubitux at gmail.com> wrote:
> >>> I'd like a feedback on this patch: there is still a "main" label in
> >>> mplayer.c. This is patch to get rid of it.
> >> 
> >> If you only want to get rid of it, just use a if(sh_video) block there
> >> and leave everything else unchanged. I don't like changing more code
> >> than necessary at least not if there seems to be no good reason to do
> >> it...
> > 
> > It's not enough since there is two goto main. I would have done it like
> > you said in case of just one.
> 
> Ok, but that's still no reason to move the code so far around.
> Also the code is confusing, part of the confusion is due to a completely pointless check ofmthe reinit result, the only thing that does is making a crash possible.
> I think the code should be
> If (video) reinit...
> If (video) previous code
> Else if (!audio) goto next

Mmh ok I see :)

Well I'll commit this version in a few days then. Thanks. Just a question
though: is the crash you were refering to would be a case where reinit
returns false but video context is still set?

-- 
Clément B.


More information about the MPlayer-dev-eng mailing list