[MPlayer-dev-eng] [PATCH]: move vo_subdevice before subopt parser
Alexander Strasser
eclipse7 at gmx.net
Fri Dec 17 11:16:22 CET 2004
Daniele Forghieri wrote ( On Fri, Dec 17, 2004 at 10:14:41AM +0100 ):
> Taking a look at the various video output module to document the
> suboption i found that some vo's don't use the parameter args passed
> from the init_best_video_out(...) function but directly the variable
> vo_subdevice (that is global).
Indeed.
> This patch make the vo_subdevice local to the function, drop the
> declaration of the variable in the .h and in some .c and change the
> function that uses it directly.
This is good idea imho. I guess the ones using the global are doing
these just due legacy reasons.
> May be is good to apply this patch before working on the subopt parser
> (or maybe is better to integrate it directly in the final patch that
> handles the subopt).
At least before modifying those modules would be better.
> BTW some vo's uses the function arg but the name is vo_subdevice (as the
> global var).
I think renaming this variable to something different would be better
anyway. As far as it goes for the vo functions we should maybe decide
for a global naming scheme of those vars like naming them all arg or
maybe optarg, optstr or suboptstr or similar. But i don't mind keeping
it as it is now, especially when the global is gone.
> The audio output modules use the global var ao_subdevice, it's a good
> thing make them work like the video modules (with the subdevice passed
> at the init function) ?
Don't know about the audio modules.
Didn't test your patch yet, but from a first look it seems good.
Alex (beastd)
More information about the MPlayer-dev-eng
mailing list