From e3d05e9971f910559480d3c13389aece3948b164 Mon Sep 17 00:00:00 2001 From: attila Date: Fri, 13 Jul 2007 14:39:18 +0000 Subject: [PATCH] Fix segfault if an 'strf' chunk couldn't be found in avi git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23772 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmpdemux/video.c b/libmpdemux/video.c index 6f42afb189..554b7ac735 100644 --- a/libmpdemux/video.c +++ b/libmpdemux/video.c @@ -85,6 +85,9 @@ switch(video_codec){ case VIDEO_OTHER: { if((d_video->demuxer->file_format == DEMUXER_TYPE_ASF) || (d_video->demuxer->file_format == DEMUXER_TYPE_AVI)) { // display info: + // in case no strf chunk has been seen in avi, we have no bitmap header + if(!sh_video->bih) return 0; + sh_video->format=sh_video->bih->biCompression; sh_video->disp_w=sh_video->bih->biWidth;