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
This commit is contained in:
attila 2007-07-13 14:39:18 +00:00
parent 338f0e6a1f
commit e3d05e9971
1 changed files with 3 additions and 0 deletions

View File

@ -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;