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

Ingo Brückl ib at wupperonline.de
Wed Sep 28 22:11:14 CEST 2011


Reimar Döffinger wrote on Wed, 28 Sep 2011 20:38:20 +0200:

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

Sorry, I don't get it.

The purpose of the code I'm changing? I'm sure you know better than I do...
Well, if MPlayer is started in idle mode and has played all files, it frees
mpctx->playtree_iter, NULLs filename and goes in its wait-for-command mode.
filename == NULL triggers this (line 3078).

In case of the GUI there never is a mpctx->playtree_iter (the GUI has its
own playlist), thus filename gets NULLed for every file in a list. At label
play_next_file, the file related configs will be read for a filename != NULL
only, i.e. never in case of the GUI.

Without GUI it can't break anything, because !use_gui is true, i.e. the
condition doesn't really change. With GUI, filename now doesn't get NULLed
(the GUI is setting the filename for MPlayer) and thus the file related
configs can be read at play_next_file.

BTW, there seems to be an issue with pure MPlayer. When continuing from
wait-for-command mode for a file playback, the file related configs won't
be read. filename is set in line 3134, but no load_per_xxx_config() there.

Ingo


More information about the MPlayer-dev-eng mailing list