[MPlayer-users] [BUGREPORT][PATCH] crash in slave mode when playing audio file

ROSEN Jeremy jeremy.rosen at c-s.fr
Wed Aug 13 17:30:51 CEST 2003

Hello again

I have a crash in mplayer

I already reported this crash once but had little feedback, so here I go
again, but with a patch 

when I run "mplayer -slave <audiofile> " then, while playing, I send the
following command "loadfile <anyfile>" I get a crash
audiofil has been tested with wma and mp3, anyfile with mp", wma and a
couple of avi and mpg files
a quick gdb run as documented in bugreport.html provides the following
crash happens at mplayer.c, in main line 3314 the line is
int pts = sh_video->pts

the problem is in an osd update block, it tries to update the video
display but the sh_video pointer is null. the attach patch simply check
for this null pointer.

Note that I am not very familiar with the code base, and that might not
be the correct way to fix this... this is my first intrusion into

the patch is based on main CVS, a couple of days old, but the bug is
also in 0.90 

hope this helps


Bugreport stuff follows
Debian unstabale
Linux pcrosen 2.4.20 #1 Mon May 5 21:59:55 CEST 2003 i686 GNU/Linux
-rwxr-xr-x    1 root     root      1103880 2003-04-19 20:57
lrwxrwxrwx    1 root     root           13 2003-05-17 15:47
/lib/libc.so.6 -> libc-2.3.1.so

This is a pre-release version of XFree86, and is not supported in any
way.  Bugs may be reported to XFree86 at XFree86.Org and patches submitted
to fixes at XFree86.Org.  Before reporting bugs in pre-release versions,
please check the latest version in the XFree86 CVS repository

XFree86 Version (Debian 4.2.1-6 20030225230350
branden at progeny.com) / X Window System
(protocol Version 11, revision 0, vendor release 6600)
Release Date: 18 October 2002
        If the server is older than 6-12 months, or if your card is
        newer than the above date, look for a newer version before
        reporting problems.  (See http://www.XFree86.Org/)
Build Operating System: Linux 2.4.20-586tsc i686 [ELF] 
Module Loader present

Lecture des spécification à partir de
Configuré avec: ../src/configure -v
--enable-languages=c,c++,java,f77,objc,ada --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared
--with-system-zlib --enable-nls --without-included-gettext
--enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm
--enable-objc-gc i386-linux
Modèle de thread: posix
version gcc 3.2.3

GNU ld version 20030523 Debian GNU/Linux

Assembleur GNU 20030523 Debian GNU/Linux
Copyright 2002 Free Software Foundation, Inc.
Ce logiciel est libre; vous pouvez le redistribuer selon les termes de
licence GNU General Public License. AUCUNE garantie n'est donnée.
Cet assembleur a été configuré pour la cible « i386-linux ».

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 6
model name      : Celeron (Mendocino)
stepping        : 5
cpu MHz         : 367.504
cache size      : 128 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca
cmov pat
pse36 mmx fxsr
bogomips        : 734.00

ati rage 128, avec driver X standard
-------------- next part --------------
Index: mplayer.c
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.710
diff -u -r1.710 mplayer.c
--- mplayer.c	9 Aug 2003 14:22:49 -0000	1.710
+++ mplayer.c	9 Aug 2003 16:43:00 -0000
@@ -3318,7 +3318,7 @@
 //================= Update OSD ====================
 #ifdef USE_OSD
-  if(osd_level>=1){
+  if(osd_level>=1 && sh_video){
       int pts=sh_video->pts;
       char osd_text_tmp[64];
       if(pts==osd_last_pts-1) ++pts; else osd_last_pts=pts;

More information about the MPlayer-users mailing list