changeset 23841:27327c023b7e

Simplify: use FFMAX
author reimar
date Wed, 25 Jul 2007 17:31:34 +0000
parents 5fd33d4d5c3e
children 9cd0d6ae322d
files libmpdemux/aviheader.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/aviheader.c	Wed Jul 25 17:29:29 2007 +0000
+++ b/libmpdemux/aviheader.c	Wed Jul 25 17:31:34 2007 +0000
@@ -258,7 +258,7 @@
       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);