diff libmpdemux/video.c @ 23752:6511f42d799d

Fix segfault if an 'strf' chunk couldn't be found in avi
author attila
date Fri, 13 Jul 2007 14:39:18 +0000
parents 4d81dbdf46b9
children e0ae2a33857a
line wrap: on
line diff
--- a/libmpdemux/video.c	Fri Jul 13 13:23:41 2007 +0000
+++ b/libmpdemux/video.c	Fri Jul 13 14:39:18 2007 +0000
@@ -85,6 +85,9 @@
  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;