changeset 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 cc06b5e849bb
children 5f186b0f3543
files libmpdemux/video.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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;