[MPlayer-dev-eng] [PATCH] EDL cleanup and fixes

Reimar =?UTF8?Q?D=F6ffinger?= Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Nov 4 15:39:35 CET 2004


Hi,
> > I know Reynaldo said so, but what good should using a counter be? It
> > seems to me that this only complicates code.
> Well, that was his decision, I'm not gonna argue...
> I believe that its better the other way, but he asked this.
> 
> > > +#ifdef USE_EDL
> > > +      user_muted = user_muted ? 0 : 1;
> >
> > user_muted = !user_muted;
> > seems much clearer to me...
> I agree, it is clearer, and i personally love that little trick. :)
> but it doesn't work here, I need to work with either 1 or 0, not -1 or 0, 
> because it is compared mixer.muted, which i didn't invent, and it uses 1 or 
> 0.
> I could use
> user_muted = !user_muted & 1;

No, I don't prefer it. But for boolean variable, != is the wrong operator anyway, ^ (boolean xor) would be right afaik.

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list