1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-20 22:02:59 +00:00

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
This commit is contained in:
jkeil 2001-07-20 11:35:47 +00:00
parent 9df40837ed
commit 59e817ef88

View File

@ -332,7 +332,7 @@ switch(sh_video->codec->driver){
#ifdef USE_DIRECTSHOW #ifdef USE_DIRECTSHOW
case 4: { // W32/DirectShow case 4: { // W32/DirectShow
if(drop_frame<2) DS_VideoDecoder_DecodeFrame(start, in_size, 0, !drop_frame); 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; break;
} }
#endif #endif