[MPlayer-users] null pointer dereference when pressing d

Matthias Lederhofer matled at gmx.net
Sun Nov 13 14:22:25 CET 2005


Hi,

Pressing "d" while playing audio causes a segfault caused by a null
pointer dereference in mplayer.c line 3279. This patch should work but
I am not familiar with the source code of mplayer so I am not sure if
there is anything missing.

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.887
diff -u -r1.887 mplayer.c
--- mplayer.c	10 Nov 2005 22:25:53 -0000	1.887
+++ mplayer.c	13 Nov 2005 13:20:41 -0000
@@ -3276,8 +3276,10 @@
       if(v < 0){
 	frame_dropping = (frame_dropping+1)%3;
 #ifdef USE_OSD
-       osd_show_framedropping=sh_video->fps/2;
-       vo_osd_changed(OSDTYPE_SUBTITLE);
+	if (sh_video) {
+	 osd_show_framedropping=sh_video->fps/2;
+	 vo_osd_changed(OSDTYPE_SUBTITLE);
+	}
 #endif
       }
       else




More information about the MPlayer-users mailing list