[MPlayer-dev-eng] Patch: Segfault With Subtitles + Missing Codec

Philip Chong pchong at ic.eecs.berkeley.edu
Fri Jan 14 23:41:51 CET 2005


Hi:

I found that playing back a video with a .SSA subtitle file causes a
segfault if the required video codec is missing, due to a null pointer
dereference in mplayer.c.  A patch is attached.

-- 
Philip Chong
pchong at eecs.berkeley.edu
-------------- next part --------------
--- mplayer.c	2005-01-14 08:40:01.000000000 -0800
+++ ../main/mplayer.c	2005-01-05 16:06:56.000000000 -0800
@@ -4001,7 +4001,7 @@
   
 #ifdef USE_SUB
   // find sub
-  if(subdata && sh_video && sh_video->pts>0){
+  if(subdata && sh_video->pts>0){
       float pts=sh_video->pts;
       if(sub_fps==0) sub_fps=sh_video->fps;
       current_module="find_sub";


More information about the MPlayer-dev-eng mailing list