mirror of https://github.com/mpv-player/mpv
Replace another MIN macro by FFMIN
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21548 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6caf5586ee
commit
77226f96ba
|
@ -13,9 +13,7 @@
|
||||||
#include "stheader.h"
|
#include "stheader.h"
|
||||||
|
|
||||||
#include "aviheader.h"
|
#include "aviheader.h"
|
||||||
|
#include "libavutil/common.h"
|
||||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
|
||||||
|
|
||||||
|
|
||||||
static MainAVIHeader avih;
|
static MainAVIHeader avih;
|
||||||
|
|
||||||
|
@ -181,16 +179,16 @@ while(1){
|
||||||
case mmioFOURCC('I','D','I','T'): hdr="Digitization Time";break;
|
case mmioFOURCC('I','D','I','T'): hdr="Digitization Time";break;
|
||||||
|
|
||||||
case ckidAVIMAINHDR: // read 'avih'
|
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
|
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);
|
if( mp_msg_test(MSGT_HEADER,MSGL_V) ) print_avih(&avih,MSGL_V); // else print_avih_flags(&avih,MSGL_V);
|
||||||
break;
|
break;
|
||||||
case ckidSTREAMHEADER: { // read 'strh'
|
case ckidSTREAMHEADER: { // read 'strh'
|
||||||
AVIStreamHeader h;
|
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
|
le2me_AVIStreamHeader(&h); // swap to machine endian
|
||||||
chunksize-=MIN(size2,sizeof(h));
|
chunksize-=FFMIN(size2,sizeof(h));
|
||||||
++stream_id;
|
++stream_id;
|
||||||
if(h.fccType==streamtypeVIDEO){
|
if(h.fccType==streamtypeVIDEO){
|
||||||
sh_video=new_sh_video(demuxer,stream_id);
|
sh_video=new_sh_video(demuxer,stream_id);
|
||||||
|
@ -711,6 +709,3 @@ skip_chunk:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef MIN
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue