From 59e817ef884c4c81d2b0e8b69012466ef0c06f74 Mon Sep 17 00:00:00 2001 From: jkeil Date: Fri, 20 Jul 2001 11:35:47 +0000 Subject: 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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1363 b3059339-0415-0410-9bf9-f77b7e298cf2 --- dec_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dec_video.c') diff --git a/dec_video.c b/dec_video.c index 29b63063cc..3d050c672a 100644 --- a/dec_video.c +++ b/dec_video.c @@ -332,7 +332,7 @@ switch(sh_video->codec->driver){ #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 -- cgit v1.2.3