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

Mathieu SCHROETER mathieu.schroeter at gamesover.ch
Mon Aug 4 16:19:52 CEST 2008


Reimar Doeffinger a écrit :
> On Mon, Aug 04, 2008 at 03:38:23PM +0200, Benjamin Zores wrote:
>> 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.
> 
> Have you checked it is still necessary and correct? I think there was an issue due to
> there being a m_config_pop too much somewhere and this was fixed already.
> Unfortunately I do not have internet at home so I can not properly check right now :-(

Hi,

Checked with r27415, the problem is always the same, as described
in my first mail. m_config_pop() is never called and the second
`loadfile` uses the last config pushed (and not usable in
the case of dvd:// because the value of dvd_angle is set to 0 by
stream/stream_dvd.c).

dvd://, here, is only an example to easily reproduce the bug..


Mathieu



More information about the MPlayer-dev-eng mailing list