[Mplayer-cvslog] CVS: main mplayer.c,1.575,1.576
Arpi of Ize
arpi at mplayerhq.hu
Fri Sep 27 22:57:04 CEST 2002
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv17842
Modified Files:
mplayer.c
Log Message:
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.
- patch by Reder Uwe <Uwe.Reder at 3SOFT.de>
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.575
retrieving revision 1.576
diff -u -r1.575 -r1.576
--- mplayer.c 26 Sep 2002 01:31:17 -0000 1.575
+++ mplayer.c 27 Sep 2002 20:57:00 -0000 1.576
@@ -162,6 +162,7 @@
int use_gui=0;
int osd_level=1;
+int osd_level_saved=-1;
int osd_visible=100;
// seek:
@@ -1288,7 +1289,16 @@
main:
current_module="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);
More information about the MPlayer-cvslog
mailing list