changeset 21532:7e36c7edce3d

Replace another MIN macro by FFMIN
author reimar
date Sat, 09 Dec 2006 12:25:25 +0000
parents a90aa203186c
children 390b966a0f8c
files libmpdemux/aviheader.c
diffstat 1 files changed, 5 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/aviheader.c	Sat Dec 09 12:24:11 2006 +0000
+++ b/libmpdemux/aviheader.c	Sat Dec 09 12:25:25 2006 +0000
@@ -13,9 +13,7 @@
 #include "stheader.h"
 
 #include "aviheader.h"
-
-#define MIN(a,b) (((a)<(b))?(a):(b))
-
+#include "libavutil/common.h"
 
 static MainAVIHeader avih;
 
@@ -181,16 +179,16 @@
     case mmioFOURCC('I','D','I','T'): hdr="Digitization Time";break;
 
     case ckidAVIMAINHDR:          // read 'avih'
-      stream_read(demuxer->stream,(char*) &avih,MIN(size2,sizeof(avih)));
+      stream_read(demuxer->stream,(char*) &avih,FFMIN(size2,sizeof(avih)));
       le2me_MainAVIHeader(&avih); // swap to machine endian
-      chunksize-=MIN(size2,sizeof(avih));
+      chunksize-=FFMIN(size2,sizeof(avih));
       if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_avih(&avih,MSGL_V); // else print_avih_flags(&avih,MSGL_V);
       break;
     case ckidSTREAMHEADER: {      // read 'strh'
       AVIStreamHeader h;
-      stream_read(demuxer->stream,(char*) &h,MIN(size2,sizeof(h)));
+      stream_read(demuxer->stream,(char*) &h,FFMIN(size2,sizeof(h)));
       le2me_AVIStreamHeader(&h);  // swap to machine endian
-      chunksize-=MIN(size2,sizeof(h));
+      chunksize-=FFMIN(size2,sizeof(h));
       ++stream_id;
       if(h.fccType==streamtypeVIDEO){
         sh_video=new_sh_video(demuxer,stream_id);
@@ -711,6 +709,3 @@
 }
 }
 
-#undef MIN
-
-