[MPlayer-dev-eng] [PATCH] Allow GUI to use filename related config

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Sep 28 20:38:20 CEST 2011


On Wed, Sep 28, 2011 at 07:34:44PM +0200, Ingo Brückl wrote:
> Reimar Döffinger wrote on Wed, 28 Sep 2011 19:07:04 +0200:
> 
> > On Wed, Sep 28, 2011 at 06:03:44PM +0200, Ingo Brückl wrote:
> >> I know we hate that, but we need it.
> >>
> >> The GUI provides MPlayer with the respective (next) filename to play.
> >> playtree_iter is always NULL in connection with the GUI, so MPlayer
> >> must not clear the filename, or else filename related config like
> >> load_per_protocol_config(), load_per_extension_config() or
> >> load_per_file_config() won't work.
> >>
> >> Ingo
> 
> >> Index: mplayer.c
> >> ===================================================================
> >> --- mplayer.c (revision 34144)
> >> +++ mplayer.c (working copy)
> >> @@ -4059,8 +4059,10 @@
> >>          (use_gui && guiInfo.Playing) ||
> >>  #endif
> >>                                          mpctx->playtree_iter != NULL || player_idle_mode) {
> >> +#ifndef CONFIG_GUI
> >>          if (!mpctx->playtree_iter)
> >>              filename = NULL;
> >> +#endif
> 
> > If that works you can just remove the code...
> > I expect you wanted to add a !use_gui really
> 
> Oops! You are right. It should be:
> 
>   if (!mpctx->playtree_iter && !use_gui)
>       filename = NULL;
> 
> > but obviously I'm no going to ask you to find a test-case for that code...
> 
> Which one? The #ifndef or the correct one?

For the code you are changing.
Something that shows it has a purpose and the change you make does not
break it, with or without GUI.


More information about the MPlayer-dev-eng mailing list