[MPlayer-cvslog] r23861 - trunk/libmpdemux/aviheader.c

reimar subversion at mplayerhq.hu
Wed Jul 25 19:31:34 CEST 2007


Author: reimar
Date: Wed Jul 25 19:31:34 2007
New Revision: 23861

Log:
Simplify: use FFMAX


Modified:
   trunk/libmpdemux/aviheader.c

Modified: trunk/libmpdemux/aviheader.c
==============================================================================
--- trunk/libmpdemux/aviheader.c	(original)
+++ trunk/libmpdemux/aviheader.c	Wed Jul 25 19:31:34 2007
@@ -258,7 +258,7 @@ while(1){
       break; }
     case ckidSTREAMFORMAT: {      // read 'strf'
       if(last_fccType==streamtypeVIDEO){
-        sh_video->bih=calloc((chunksize<sizeof(BITMAPINFOHEADER))?sizeof(BITMAPINFOHEADER):chunksize,1);
+        sh_video->bih=calloc(FFMAX(chunksize, sizeof(BITMAPINFOHEADER)), 1);
 //        sh_video->bih=malloc(chunksize); memset(sh_video->bih,0,chunksize);
         mp_msg(MSGT_HEADER,MSGL_V,MSGTR_MPDEMUX_AVIHDR_FoundBitmapInfoHeader,chunksize,sizeof(BITMAPINFOHEADER));
         stream_read(demuxer->stream,(char*) sh_video->bih,chunksize);



More information about the MPlayer-cvslog mailing list