[Mplayer-cvslog] Re: CVS: main/libmpcodecs ve_xvid.c,1.2,1.3

Rémi Guyomarch rguyom at pobox.com
Sun Nov 3 19:57:35 CET 2002


On Sun, Nov 03, 2002 at 05:45:06PM +0100, Kim Minh Kaplan wrote:
> Rémi Guyomarch writes:
> 
> > On Sun, Nov 03, 2002 at 04:54:44PM +0100, Kim Minh Kaplan wrote:
> >
> >> RXmi Guyomarch CVS writes:
> >> 
> >>> coding style etc...:
> >>> - Use static variables instead of a big struct for individual options,
> >>> easier to initialize.
> >> 
> >> Why do this?  This is more a step backward than forward.
> >
> > Well, I think it's easier to see which variable is initialized by
> > which value.
> 
> C's designated initialisers were meant to solve this I think.
> 
> > Since these variables are declared static, they won't clash with
> > others declared elsewhere.
> 
> It's not only a problem of name clash, but rather that it prevents
> multiple use of the same filter in the same instance of a program.
> Just imagine what will happen when (if) we want to encode a multi
> angle DVD to an file with multiple video streams...  Ok, I'm just
> dreaming :)

Ok, there's two separate issues here :
1) multiple filters in one instance of mencoder
2) one struct with designated initialisers vs a loose collection of
variables.

1) can be fixed with a few lines patch right now (only two global
variables are used outside of config()).
2) is more a preference than something else, at least this is the way
I see it.

-- 
Rémi



More information about the MPlayer-cvslog mailing list