[MPlayer-dev-eng] PATCH: OSD Level change not restored
Reder Uwe
Uwe.Reder at 3SOFT.de
Fri Sep 27 10:33:43 CEST 2002
Resent with the word 'PATCH' in the subject to meet official requirements ;-)
Hi,
when working through a mixed play tree with audi-only files and video files the OSD level is set to 0 when playing an audio-only file. The previous OSD level never gets restored. My small patch handles this.
--- snip snip ---
--- mplayer.c 2002/09/23 09:59:19 1.1
+++ mplayer.c 2002/09/23 10:26:48
@@ -161,6 +161,7 @@
int use_gui=0;
int osd_level=1;
+int osd_level_saved=-1;
int osd_visible=100;
// seek:
@@ -1352,7 +1353,16 @@
//================== MAIN: ==========================
main:
-if(!sh_video) osd_level = 0;
+// If there is no video OSD has to be disabled.
+// In case of playing a playtree we have to restore the
+// old OSD level after playing one or more audio-only files.
+if(!sh_video && osd_level > 0) { // save OSD level only once
+ osd_level_saved = osd_level;
+ osd_level = 0;
+} else if (osd_level_saved > -1) { // if there is a saved OSD level, restore it
+ osd_level = osd_level_saved;
+ osd_level_saved = -1;
+}
fflush(stdout);
--- snip snip ---
Bye, Uwe
More information about the MPlayer-dev-eng
mailing list