[Mplayer-cvslog] CVS: main dec_video.c,1.7,1.8

Jürgen Keil jkeil at mplayer.dev.hu
Fri Jul 20 13:35:49 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv12072

Modified Files:
	dec_video.c 
Log Message:
Fix segfault in DShow video decoder.  Using directshow, the
sh_video->out_out_buffer is NULL on the first few decoded frames,  and is
initialized in loader/DirectShow/outputpin.cpp, method COutputPin::Receive(),
while the video is already running.

Do not try to display a frame while sh_video->out_out_buffer is still NULL.
Such a test was present in the previous to last revision of this file, but
was lost in the last revision.


Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- dec_video.c	20 Jul 2001 02:14:14 -0000	1.7
+++ dec_video.c	20 Jul 2001 11:35:47 -0000	1.8
@@ -332,7 +332,7 @@
 #ifdef USE_DIRECTSHOW
   case 4: {        // W32/DirectShow
     if(drop_frame<2) DS_VideoDecoder_DecodeFrame(start, in_size, 0, !drop_frame);
-    if(!drop_frame) blit_frame=3;
+    if(!drop_frame && sh_video->our_out_buffer) blit_frame=3;
     break;
   }
 #endif




More information about the MPlayer-cvslog mailing list