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

Mathieu SCHROETER mathieu.schroeter at gamesover.ch
Sat Jul 12 23:06:26 CEST 2008


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..


Sorry for that...
Regards,
--
Mathieu SCHROETER
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_slave_cmd_stop.patch
Type: text/x-patch
Size: 417 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080712/5a22d625/attachment.bin>


More information about the MPlayer-dev-eng mailing list