[MPlayer-dev-eng] [PATCH] wrong behaviour with slave command 'stop'

Benjamin Zores ben at geexbox.org
Mon Aug 4 15:38:23 CEST 2008


Mathieu SCHROETER wrote:
> Hello,
> 
> I've written some weeks ago a patch to add a slave command
> 'stop' especially for "-slave -idle" modes.
> 
> (cvslog r26909)
> http://lists.mplayerhq.hu/pipermail/mplayer-cvslog/2008-May/034513.html
> 
> But it seems to have a problem.
> 
> To reproduce (easly reproducible with dvd://):
> 
>  $mplayer -idle -slave -quiet
>   <snip>
>  loadfile dvd://
>  stop
>  loadfile dvd://
> 
> And here, an error because dvd_angle = 0 instead of 1.
> 
> 
> And:
> 
>  $mplayer -idle -slave -quiet
>   <snip>
>  loadfile dvd://
>  loadfile dvd://
> 
> Here there is no error on dvd_angle.
> 
> 
> After a lot of debugging with gdb, I've found my mistake in command.c.
> 
> When we use `loadfile` to stop playback, loadfile calls the
> functions "play_tree_iter(_up)_step()" and these functions calls
> "m_config_pop()". If I've understood correctly, m_config_pop() restore
> the previous configuration. And at least, restore "dvd_angle = 1"
> in my example.
> 
> In this case, I've written this patch to fix this behaviour with
> the slave command 'stop'.
> 
> I've looked in "case MP_CMD_LOADFILE:" to adapt for 'stop'.
> I hope that someone can review this patch, it works fine for me
> but I'm not sure to use the right way. Thanks..

I'm gonna apply this patch within the week unless someone
(random pick ... Ivan ?) objects to.

Ben



More information about the MPlayer-dev-eng mailing list