[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[352] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-11-13 07:52:07
|
Revision: 352 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=352&view=rev Author: nickols_k Date: 2012-11-13 07:51:55 +0000 (Tue, 13 Nov 2012) Log Message: ----------- initial QoS protection for modules Modified Paths: -------------- README mplayerxp/configure mplayerxp/input2/input.c mplayerxp/libao2/audio_out.c mplayerxp/libao2/audio_out.h mplayerxp/libao2/mixer.c mplayerxp/libmpcodecs/ad_vorbis.c mplayerxp/libmpcodecs/dec_audio.c mplayerxp/libmpcodecs/dec_audio.h mplayerxp/libmpcodecs/dec_video.c mplayerxp/libmpcodecs/dec_video.h mplayerxp/libmpcodecs/vd.c mplayerxp/libmpdemux/demuxer.c mplayerxp/libmpdemux/demuxer.h mplayerxp/libmpdemux/stream.c mplayerxp/libmpdemux/stream.h mplayerxp/libplaytree/asxparser.c mplayerxp/libplaytree/playtreeparser.c mplayerxp/libvo/video_out.c mplayerxp/libvo/video_out.h mplayerxp/mplayerxp.c mplayerxp/osdep/mplib.c mplayerxp/osdep/mplib.h mplayerxp/postproc/af.c mplayerxp/postproc/af.h mplayerxp/postproc/af_ao2.c mplayerxp/postproc/vf.c mplayerxp/postproc/vf.h mplayerxp/postproc/vf_vo.c mplayerxp/xmpcore/xmp_adecoder.c mplayerxp/xmpcore/xmp_aplayer.c mplayerxp/xmpcore/xmp_vdecoder.c mplayerxp/xmpcore/xmp_vplayer.c Modified: README =================================================================== --- README 2012-11-13 06:22:26 UTC (rev 351) +++ README 2012-11-13 07:51:55 UTC (rev 352) @@ -150,6 +150,12 @@ pointer on XP-CORE between antiviral-holes which reject memory scan. Also it attempts to prevent registration of unknown drivers using some antiviral traps. +Furthermore, GCC itself has a virual nature because it supports so-called +__attribute__ ((alias (#name))); __attribute__ ((weak)) +which allow overload any function of program. To avoid that MPlayerXP uses +RND_RENAME() macroses which generate pseudo-random names for some functions +during configure time. + But last word in this way was not speaked. ;) Best regards! Nickols_K Modified: mplayerxp/configure =================================================================== --- mplayerxp/configure 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/configure 2012-11-13 07:51:55 UTC (rev 352) @@ -768,7 +768,15 @@ EOF cc_check || die "Canot generate pseudo-random numbers" +echocheck "generating pseudo-random numbers" rnd_arr=`$TMPO` +sleep 1 +rnd_carr=`$TMPO` +sleep 1 +rnd_sarr=`$TMPO` +sleep 1 +rnd_farr=`$TMPO` +echores "done" rnd0=`echo $rnd_arr | cut -d ' ' -f 1` rnd1=`echo $rnd_arr | cut -d ' ' -f 2` @@ -781,17 +789,50 @@ rnd8=`echo $rnd_arr | cut -d ' ' -f 9` rnd9=`echo $rnd_arr | cut -d ' ' -f 10` -crnd0=$(($rnd0 % 255)) -crnd1=$(($rnd1 % 255)) -crnd2=$(($rnd2 % 255)) -crnd3=$(($rnd3 % 255)) -crnd4=$(($rnd4 % 255)) -crnd5=$(($rnd5 % 255)) -crnd6=$(($rnd6 % 255)) -crnd7=$(($rnd7 % 255)) -crnd8=$(($rnd8 % 255)) -crnd9=$(($rnd9 % 255)) +srnd0=`echo $rnd_sarr | cut -d ' ' -f 1` +srnd1=`echo $rnd_sarr | cut -d ' ' -f 2` +srnd2=`echo $rnd_sarr | cut -d ' ' -f 3` +srnd3=`echo $rnd_sarr | cut -d ' ' -f 4` +srnd4=`echo $rnd_sarr | cut -d ' ' -f 5` +srnd5=`echo $rnd_sarr | cut -d ' ' -f 6` +srnd6=`echo $rnd_sarr | cut -d ' ' -f 7` +srnd7=`echo $rnd_sarr | cut -d ' ' -f 8` +srnd8=`echo $rnd_sarr | cut -d ' ' -f 9` +srnd9=`echo $rnd_sarr | cut -d ' ' -f 10` +frnd0=`echo $rnd_farr | cut -d ' ' -f 1` +frnd1=`echo $rnd_farr | cut -d ' ' -f 2` +frnd2=`echo $rnd_farr | cut -d ' ' -f 3` +frnd3=`echo $rnd_farr | cut -d ' ' -f 4` +frnd4=`echo $rnd_farr | cut -d ' ' -f 5` +frnd5=`echo $rnd_farr | cut -d ' ' -f 6` +frnd6=`echo $rnd_farr | cut -d ' ' -f 7` +frnd7=`echo $rnd_farr | cut -d ' ' -f 8` +frnd8=`echo $rnd_farr | cut -d ' ' -f 9` +frnd9=`echo $rnd_farr | cut -d ' ' -f 10` + +crnd0=`echo $rnd_carr | cut -d ' ' -f 1` +crnd1=`echo $rnd_carr | cut -d ' ' -f 2` +crnd2=`echo $rnd_carr | cut -d ' ' -f 3` +crnd3=`echo $rnd_carr | cut -d ' ' -f 4` +crnd4=`echo $rnd_carr | cut -d ' ' -f 5` +crnd5=`echo $rnd_carr | cut -d ' ' -f 6` +crnd6=`echo $rnd_carr | cut -d ' ' -f 7` +crnd7=`echo $rnd_carr | cut -d ' ' -f 8` +crnd8=`echo $rnd_carr | cut -d ' ' -f 9` +crnd9=`echo $rnd_carr | cut -d ' ' -f 10` + +crnd0=$(($crnd0 % 255)) +crnd1=$(($crnd1 % 255)) +crnd2=$(($crnd2 % 255)) +crnd3=$(($crnd3 % 255)) +crnd4=$(($crnd4 % 255)) +crnd5=$(($crnd5 % 255)) +crnd6=$(($crnd6 % 255)) +crnd7=$(($crnd7 % 255)) +crnd8=$(($crnd8 % 255)) +crnd9=$(($crnd9 % 255)) + ############################################################################# echo "Creating mp_config.mak" cat >> mp_config.mak << EOF @@ -1004,28 +1045,28 @@ #define RND_NUMBER8 $rnd8 #define RND_NUMBER9 $rnd9 -#define RND_STR0 "$rnd0" -#define RND_STR1 "$rnd1" -#define RND_STR2 "$rnd2" -#define RND_STR3 "$rnd3" -#define RND_STR4 "$rnd4" -#define RND_STR5 "$rnd5" -#define RND_STR6 "$rnd6" -#define RND_STR7 "$rnd7" -#define RND_STR8 "$rnd8" -#define RND_STR9 "$rnd9" +#define RND_STR0 "$srnd0" +#define RND_STR1 "$srnd1" +#define RND_STR2 "$srnd2" +#define RND_STR3 "$srnd3" +#define RND_STR4 "$srnd4" +#define RND_STR5 "$srnd5" +#define RND_STR6 "$srnd6" +#define RND_STR7 "$srnd7" +#define RND_STR8 "$srnd8" +#define RND_STR9 "$srnd9" -#define RND_RENAME0(a) a ## $rnd0 -#define RND_RENAME1(a) a ## $rnd1 -#define RND_RENAME2(a) a ## $rnd2 -#define RND_RENAME3(a) a ## $rnd3 -#define RND_RENAME4(a) a ## $rnd4 -#define RND_RENAME5(a) a ## $rnd5 -#define RND_RENAME6(a) a ## $rnd6 -#define RND_RENAME7(a) a ## $rnd7 -#define RND_RENAME8(a) a ## $rnd8 -#define RND_RENAME9(a) a ## $rnd9 +#define RND_RENAME0(a) a ## $frnd0 +#define RND_RENAME1(a) a ## $frnd1 +#define RND_RENAME2(a) a ## $frnd2 +#define RND_RENAME3(a) a ## $frnd3 +#define RND_RENAME4(a) a ## $frnd4 +#define RND_RENAME5(a) a ## $frnd5 +#define RND_RENAME6(a) a ## $frnd6 +#define RND_RENAME7(a) a ## $frnd7 +#define RND_RENAME8(a) a ## $frnd8 +#define RND_RENAME9(a) a ## $frnd9 #endif /* MPXP_CONFIG_H */ EOF Modified: mplayerxp/input2/input.c =================================================================== --- mplayerxp/input2/input.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/input2/input.c 2012-11-13 07:51:55 UTC (rev 352) @@ -742,6 +742,7 @@ filter->ctx = ctx; filter->next = priv->cmd_filters; priv->cmd_filters = filter; + RND_RENAME0(rnd_fill)(priv->antiviral_hole,sizeof(priv->antiviral_hole)); } static char* mp_input_find_bind_for_key(const mp_cmd_bind_t* binds, int n,int* keys) { Modified: mplayerxp/libao2/audio_out.c =================================================================== --- mplayerxp/libao2/audio_out.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libao2/audio_out.c 2012-11-13 07:51:55 UTC (rev 352) @@ -66,7 +66,7 @@ NULL }; -static const ao_functions_t *audio_out=NULL; +static const ao_functions_t *RND_RENAME8(audio_out)=NULL; char * __FASTCALL__ ao_format_name(int format) { @@ -182,46 +182,47 @@ MSG_INFO("\n"); } -const ao_functions_t* __FASTCALL__ ao_register(const char *driver_name) +const ao_functions_t* __FASTCALL__ RND_RENAME4(ao_register)(const char *driver_name) { unsigned i; if(!driver_name) - audio_out=audio_out_drivers[0]; + RND_RENAME8(audio_out)=audio_out_drivers[0]; else for (i=0; audio_out_drivers[i] != &audio_out_null; i++) { const ao_info_t *info = audio_out_drivers[i]->info; if(strcmp(info->short_name,driver_name) == 0){ - audio_out = audio_out_drivers[i];break; + RND_RENAME8(audio_out) = audio_out_drivers[i];break; } } - return audio_out; + return RND_RENAME8(audio_out); } const ao_info_t* ao_get_info( void ) { - return audio_out->info; + return RND_RENAME8(audio_out)->info; } -ao_data_t* __FASTCALL__ ao_init(unsigned flags,const char *subdevice) +ao_data_t* __FASTCALL__ RND_RENAME5(ao_init)(unsigned flags,const char *subdevice) { ao_data_t* ao; ao=mp_mallocz(sizeof(ao_data_t)); if(subdevice) ao->subdevice=mp_strdup(subdevice); ao->outburst=OUTBURST; ao->buffersize=-1; - if(audio_out->init(ao,flags)==MPXP_Ok) return ao; + RND_RENAME0(rnd_fill)(ao->antiviral_hole,sizeof(ao->antiviral_hole)); + if(RND_RENAME8(audio_out)->init(ao,flags)==MPXP_Ok) return ao; mp_free(ao); return NULL; } MPXP_Rc __FASTCALL__ ao_configure(ao_data_t*ao,unsigned rate,unsigned channels,unsigned format) { - return audio_out->configure(ao,rate,channels,format); + return RND_RENAME8(audio_out)->configure(ao,rate,channels,format); } void ao_uninit(ao_data_t*ao) { - audio_out->uninit(ao); + RND_RENAME8(audio_out)->uninit(ao); if(ao->subdevice) mp_free(ao->subdevice); mp_free(ao); ao=NULL; @@ -229,35 +230,35 @@ void ao_reset(ao_data_t*ao) { - if(ao) audio_out->reset(ao); + if(ao) RND_RENAME8(audio_out)->reset(ao); } unsigned ao_get_space(ao_data_t*ao) { - return ao?audio_out->get_space(ao):0; + return ao?RND_RENAME8(audio_out)->get_space(ao):0; } float ao_get_delay(ao_data_t*ao) { - return ao?audio_out->get_delay(ao):0; + return ao?RND_RENAME8(audio_out)->get_delay(ao):0; } -unsigned __FASTCALL__ ao_play(ao_data_t*ao,any_t* data,unsigned len,unsigned flags) +unsigned __FASTCALL__ RND_RENAME6(ao_play)(ao_data_t*ao,any_t* data,unsigned len,unsigned flags) { - return ao?audio_out->play(ao,data,len,flags):0; + return ao?RND_RENAME8(audio_out)->play(ao,data,len,flags):0; } void ao_pause(ao_data_t*ao) { - if(ao) audio_out->pause(ao); + if(ao) RND_RENAME8(audio_out)->pause(ao); } void ao_resume(ao_data_t*ao) { - if(ao) audio_out->resume(ao); + if(ao) RND_RENAME8(audio_out)->resume(ao); } -MPXP_Rc __FASTCALL__ ao_control(ao_data_t*ao,int cmd,long arg) +MPXP_Rc __FASTCALL__ RND_RENAME7(ao_control)(ao_data_t*ao,int cmd,long arg) { - return ao?audio_out->control(ao,cmd,arg):MPXP_Error; + return ao?RND_RENAME8(audio_out)->control(ao,cmd,arg):MPXP_Error; } Modified: mplayerxp/libao2/audio_out.h =================================================================== --- mplayerxp/libao2/audio_out.h 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libao2/audio_out.h 2012-11-13 07:51:55 UTC (rev 352) @@ -15,6 +15,7 @@ typedef struct ao_data_s { char* subdevice; + char antiviral_hole[RND_CHAR2]; unsigned samplerate; /**< rate of samples in Hz */ unsigned channels; /**< number of audio channels */ unsigned format; /**< format of audio samples */ @@ -98,16 +99,16 @@ extern int __FASTCALL__ ao_format_bits(int format); extern void ao_print_help( void ); -extern const ao_functions_t* __FASTCALL__ ao_register(const char *driver_name); +extern const ao_functions_t* __FASTCALL__ RND_RENAME4(ao_register)(const char *driver_name); extern const ao_info_t* ao_get_info( void ); -extern ao_data_t* __FASTCALL__ ao_init(unsigned flags,const char *subdevice); +extern ao_data_t* __FASTCALL__ RND_RENAME5(ao_init)(unsigned flags,const char *subdevice); extern MPXP_Rc __FASTCALL__ ao_configure(ao_data_t* priv,unsigned rate,unsigned channels,unsigned format); extern void __FASTCALL__ ao_uninit(ao_data_t* priv); extern void __FASTCALL__ ao_reset(ao_data_t* priv); extern unsigned __FASTCALL__ ao_get_space(ao_data_t* priv); -extern unsigned __FASTCALL__ ao_play(ao_data_t* priv,any_t* data,unsigned len,unsigned flags); +extern unsigned __FASTCALL__ RND_RENAME6(ao_play)(ao_data_t* priv,any_t* data,unsigned len,unsigned flags); extern float __FASTCALL__ ao_get_delay(ao_data_t* priv); extern void __FASTCALL__ ao_pause(ao_data_t* priv); extern void __FASTCALL__ ao_resume(ao_data_t* priv); -extern MPXP_Rc __FASTCALL__ ao_control(ao_data_t* priv,int cmd,long arg); +extern MPXP_Rc __FASTCALL__ RND_RENAME7(ao_control)(ao_data_t* priv,int cmd,long arg); #endif Modified: mplayerxp/libao2/mixer.c =================================================================== --- mplayerxp/libao2/mixer.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libao2/mixer.c 2012-11-13 07:51:55 UTC (rev 352) @@ -12,7 +12,7 @@ { ao_control_vol_t vol; *l=0; *r=0; - if(MPXP_Ok != ao_control(ao,AOCONTROL_GET_VOLUME,(long)&vol)) return; + if(MPXP_Ok != RND_RENAME7(ao_control)(ao,AOCONTROL_GET_VOLUME,(long)&vol)) return; *r=vol.right; *l=vol.left; } @@ -21,7 +21,7 @@ { ao_control_vol_t vol; vol.right=r; vol.left=l; - ao_control(ao,AOCONTROL_SET_VOLUME,(long)&vol); + RND_RENAME7(ao_control)(ao,AOCONTROL_SET_VOLUME,(long)&vol); } #define MIXER_CHANGE 3 Modified: mplayerxp/libmpcodecs/ad_vorbis.c =================================================================== --- mplayerxp/libmpcodecs/ad_vorbis.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libmpcodecs/ad_vorbis.c 2012-11-13 07:51:55 UTC (rev 352) @@ -99,7 +99,7 @@ #define OGG_FMT16 AFMT_S16_LE #endif sh->afmt=OGG_FMT16; - if(ao_control(ao_data,AOCONTROL_QUERY_FORMAT,OGG_FMT32) == MPXP_Ok) { + if(RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_FORMAT,OGG_FMT32) == MPXP_Ok) { sh->afmt=OGG_FMT32; } // assume 128kbit if bitrate not specified in the header Modified: mplayerxp/libmpcodecs/dec_audio.c =================================================================== --- mplayerxp/libmpcodecs/dec_audio.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libmpcodecs/dec_audio.c 2012-11-13 07:51:55 UTC (rev 352) @@ -28,7 +28,7 @@ static const ad_functions_t* mpadec; -MPXP_Rc mpca_init(sh_audio_t *sh_audio) +MPXP_Rc RND_RENAME2(mpca_init)(sh_audio_t *sh_audio) { mpadec=afm_find_driver(sh_audio->codec->driver_name); if(!mpadec){ @@ -143,7 +143,7 @@ unsigned in_samplerate, unsigned in_channels, unsigned in_format, unsigned* out_samplerate, unsigned* out_channels, unsigned* out_format){ char strbuf[200]; - af_stream_t* afs=af_new(sh_audio); + af_stream_t* afs=RND_RENAME6(af_new)(sh_audio); // input format: same as codec's output format: afs->input.rate = in_samplerate; @@ -163,7 +163,7 @@ afs->input.rate,afs->input.nch,(afs->input.format&MPAF_BPS_MASK)*8); // let's autoprobe it! - if(MPXP_Ok != af_init(afs,0)){ + if(MPXP_Ok != RND_RENAME7(af_init)(afs,0)){ mp_free(afs); return MPXP_False; // failed :( } @@ -190,7 +190,7 @@ unsigned out_minsize, unsigned out_maxsize){ char strbuf[200]; af_stream_t* afs=sh_audio->afilter; - if(!afs) afs = af_new(sh_audio); + if(!afs) afs = RND_RENAME6(af_new)(sh_audio); // input format: same as codec's output format: afs->input.rate = in_samplerate; @@ -210,7 +210,7 @@ afs->output.rate,afs->output.nch,(afs->output.format&MPAF_BPS_MASK)*8,ao_format_name(mpaf_format_encode(afs->output.format))); // let's autoprobe it! - if(MPXP_Ok != af_init(afs,1)){ + if(MPXP_Ok != RND_RENAME7(af_init)(afs,1)){ sh_audio->afilter=NULL; mp_free(afs); return MPXP_False; // failed :( @@ -255,7 +255,7 @@ out_minsize,out_maxsize); } -unsigned mpca_decode(sh_audio_t *sh_audio,unsigned char *buf,unsigned minlen,unsigned maxlen,unsigned buflen,float *pts) +unsigned RND_RENAME3(mpca_decode)(sh_audio_t *sh_audio,unsigned char *buf,unsigned minlen,unsigned maxlen,unsigned buflen,float *pts) { unsigned len; unsigned cp_size,cp_tile; @@ -293,7 +293,7 @@ afd.rate=sh_audio->rate; afd.nch=sh_audio->nch; afd.format=mpaf_format_decode(sh_audio->afmt); - pafd=af_play(sh_audio->afilter,&afd); + pafd=RND_RENAME8(af_play)(sh_audio->afilter,&afd); if(!pafd) { MSG_V("decaudio: filter error\n"); Modified: mplayerxp/libmpcodecs/dec_audio.h =================================================================== --- mplayerxp/libmpcodecs/dec_audio.h 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libmpcodecs/dec_audio.h 2012-11-13 07:51:55 UTC (rev 352) @@ -6,9 +6,9 @@ // dec_audio.c: extern const ad_functions_t* __FASTCALL__ mpca_find_driver(const char *name); -extern MPXP_Rc __FASTCALL__ mpca_init(sh_audio_t *sh_audio); +extern MPXP_Rc __FASTCALL__ RND_RENAME2(mpca_init)(sh_audio_t *sh_audio); extern void __FASTCALL__ mpca_uninit(sh_audio_t *sh_audio); -extern unsigned __FASTCALL__ mpca_decode(sh_audio_t *sh_audio,unsigned char *buf,unsigned minlen,unsigned maxlen,unsigned buflen,float *pts); +extern unsigned __FASTCALL__ RND_RENAME3(mpca_decode)(sh_audio_t *sh_audio,unsigned char *buf,unsigned minlen,unsigned maxlen,unsigned buflen,float *pts); extern void __FASTCALL__ mpca_resync_stream(sh_audio_t *sh_audio); extern void __FASTCALL__ mpca_skip_frame(sh_audio_t *sh_audio); struct codecs_st; Modified: mplayerxp/libmpcodecs/dec_video.c =================================================================== --- mplayerxp/libmpcodecs/dec_video.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libmpcodecs/dec_video.c 2012-11-13 07:51:55 UTC (rev 352) @@ -128,7 +128,7 @@ return MPXP_Ok; } -MPXP_Rc mpcv_init(sh_video_t *sh_video,const char* codecname,const char * vfm,int status,any_t*libinput){ +MPXP_Rc RND_RENAME3(mpcv_init)(sh_video_t *sh_video,const char* codecname,const char * vfm,int status,any_t*libinput){ sh_video->codec=NULL; MSG_DBG3("mpcv_init(%p, %s, %s, %i)\n",sh_video,codecname,vfm,status); while((sh_video->codec=find_codec(sh_video->fourcc, @@ -226,7 +226,7 @@ extern vo_data_t* vo_data; static void update_subtitle(sh_video_t *sh_video,float v_pts,unsigned idx); -int mpcv_decode(sh_video_t *sh_video,const enc_frame_t* frame){ +int RND_RENAME4(mpcv_decode)(sh_video_t *sh_video,const enc_frame_t* frame){ vf_instance_t* vf; mp_image_t *mpi=NULL; unsigned int t; Modified: mplayerxp/libmpcodecs/dec_video.h =================================================================== --- mplayerxp/libmpcodecs/dec_video.h 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libmpcodecs/dec_video.h 2012-11-13 07:51:55 UTC (rev 352) @@ -3,11 +3,11 @@ #include "xmpcore/xmp_enums.h" // dec_video.c: -extern MPXP_Rc __FASTCALL__ mpcv_init(sh_video_t *sh_video, const char *codec_name,const char *family,int status,any_t*libinput); +extern MPXP_Rc __FASTCALL__ RND_RENAME3(mpcv_init)(sh_video_t *sh_video, const char *codec_name,const char *family,int status,any_t*libinput); extern void __FASTCALL__ mpcv_uninit(sh_video_t *sh_video); extern MPXP_Rc __FASTCALL__ mpcv_ffmpeg_init(sh_video_t*,any_t* libinput); -extern int __FASTCALL__ mpcv_decode(sh_video_t *sh_video,const enc_frame_t* frame); +extern int __FASTCALL__ RND_RENAME4(mpcv_decode)(sh_video_t *sh_video,const enc_frame_t* frame); extern MPXP_Rc __FASTCALL__ mpcv_get_quality_max(sh_video_t *sh_video,unsigned *qual); extern MPXP_Rc __FASTCALL__ mpcv_set_quality(sh_video_t *sh_video,int quality); Modified: mplayerxp/libmpcodecs/vd.c =================================================================== --- mplayerxp/libmpcodecs/vd.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libmpcodecs/vd.c 2012-11-13 07:51:55 UTC (rev 352) @@ -163,13 +163,13 @@ MSG_WARN("'%s' ",vo_format_name(sh->codec->outfmt[ind])); } MSG_WARN("Trying -vf fmtcvt\n"); - sc=vf=vf_open_filter(vf,sh,"fmtcvt",NULL,libinput); + sc=vf=RND_RENAME9(vf_open_filter)(vf,sh,"fmtcvt",NULL,libinput); goto csp_again; } else if(palette==1){ MSG_V("vd: Trying -vf palette...\n"); palette=-1; - vf=vf_open_filter(vf,sh,"palette",NULL,libinput); + vf=RND_RENAME9(vf_open_filter)(vf,sh,"palette",NULL,libinput); goto csp_again; } else { // sws failed, if the last filter (vf_vo) support MPEGPES try to append vf_lavc @@ -203,7 +203,7 @@ if(vo_data->flags&VFCAP_FLIPPED) vo_FLIP_REVERT(vo_data); if(vo_FLIP(vo_data) && !(vo_data->flags&VFCAP_FLIP)){ // we need to flip, but no flipping filter avail. - sh->vfilter=vf=vf_open_filter(vf,sh,"mirror","x",libinput); + sh->vfilter=vf=RND_RENAME9(vf_open_filter)(vf,sh,"flip",NULL,libinput); } // time to do aspect ratio corrections... Modified: mplayerxp/libmpdemux/demuxer.c =================================================================== --- mplayerxp/libmpdemux/demuxer.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libmpdemux/demuxer.c 2012-11-13 07:51:55 UTC (rev 352) @@ -115,6 +115,7 @@ demux_stream_t* new_demuxer_stream(struct demuxer_s *demuxer,int id){ demux_stream_t* ds=mp_malloc(sizeof(demux_stream_t)); + RND_RENAME0(rnd_fill)(ds->antiviral_hole,sizeof(ds->antiviral_hole)); ds->buffer_pos=ds->buffer_size=0; ds->buffer=NULL; ds->pts=0; @@ -141,6 +142,7 @@ demuxer_t* new_demuxer(stream_t *stream,int type,int a_id,int v_id,int s_id){ demuxer_t *d=mp_mallocz(sizeof(demuxer_t)); + RND_RENAME0(rnd_fill)(d->antiviral_hole,sizeof(d->antiviral_hole)); d->stream=stream; d->movi_start=stream->start_pos; d->movi_end=stream->end_pos; @@ -585,7 +587,7 @@ static char* sub_stream = NULL; static int demuxer_type = 0, audio_demuxer_type = 0, sub_demuxer_type = 0; -demuxer_t* demux_open(stream_t *vs,int file_format,int audio_id,int video_id,int dvdsub_id){ +demuxer_t* RND_RENAME1(demux_open)(stream_t *vs,int file_format,int audio_id,int video_id,int dvdsub_id){ stream_t *as = NULL,*ss = NULL; demuxer_t *vd,*ad = NULL,*sd = NULL; int afmt = 0,sfmt = 0; @@ -595,14 +597,14 @@ #endif if(audio_stream) { - as = open_stream(libinput,audio_stream,&afmt,NULL); + as = RND_RENAME2(open_stream)(libinput,audio_stream,&afmt,NULL); if(!as) { MSG_ERR("Can't open audio stream: %s\n",audio_stream); return NULL; } } if(sub_stream) { - ss = open_stream(libinput,sub_stream,&sfmt,NULL); + ss = RND_RENAME2(open_stream)(libinput,sub_stream,&sfmt,NULL); if(!ss) { MSG_ERR("Can't open subtitles stream: %s\n",sub_stream); return NULL; Modified: mplayerxp/libmpdemux/demuxer.h =================================================================== --- mplayerxp/libmpdemux/demuxer.h 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libmpdemux/demuxer.h 2012-11-13 07:51:55 UTC (rev 352) @@ -64,6 +64,7 @@ /** Describes interface to stream associated with this demuxer */ typedef struct demux_stream_s { int id; /**< stream ID (for multiple audio/video streams) */ + char antiviral_hole[RND_CHAR2]; int buffer_pos; /**< current buffer position */ int buffer_size; /**< current buffer size */ unsigned char* buffer; /**< current buffer */ @@ -102,6 +103,7 @@ }; /** Describes demuxer (demultiplexer) of movie */ typedef struct demuxer_s { + char antiviral_hole[RND_CHAR3]; stream_t* stream; /**< stream for movie reading */ demux_stream_t* audio; /**< audio buffer/demuxer */ demux_stream_t* video; /**< video buffer/demuxer */ @@ -232,7 +234,7 @@ // This is defined here because demux_stream_t ins't defined in stream.h stream_t* __FASTCALL__ new_ds_stream(demux_stream_t *ds); -demuxer_t* demux_open(stream_t *stream,int file_format,int aid,int vid,int sid); +demuxer_t* RND_RENAME1(demux_open)(stream_t *stream,int file_format,int aid,int vid,int sid); int demux_seek(demuxer_t *demuxer,const seek_args_t* seeka); demuxer_t* new_demuxers_demuxer(demuxer_t* vd, demuxer_t* ad, demuxer_t* sd); Modified: mplayerxp/libmpdemux/stream.c =================================================================== --- mplayerxp/libmpdemux/stream.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libmpdemux/stream.c 2012-11-13 07:51:55 UTC (rev 352) @@ -87,7 +87,7 @@ NULL }; -stream_t* __FASTCALL__ open_stream(any_t*libinput,const char* filename,int* file_format,stream_callback event_handler) +stream_t* __FASTCALL__ RND_RENAME2(open_stream)(any_t*libinput,const char* filename,int* file_format,stream_callback event_handler) { unsigned i,done; unsigned mrl_len; @@ -238,6 +238,7 @@ stream_t *s=mp_mallocz(sizeof(stream_t)); if(s==NULL) return NULL; + RND_RENAME0(rnd_fill)(s->antiviral_hole,sizeof(s->antiviral_hole)); s->fd=-1; s->type=type; s->sector_size=STREAM_BUFFER_SIZE; Modified: mplayerxp/libmpdemux/stream.h =================================================================== --- mplayerxp/libmpdemux/stream.h 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libmpdemux/stream.h 2012-11-13 07:51:55 UTC (rev 352) @@ -42,6 +42,7 @@ /** Stream description */ typedef struct stream_s{ + char antiviral_hole[RND_CHAR3]; int fd; /**< file handler */ off_t pos; /**< SOF offset from begin of stream */ int eof; /**< indicates EOF */ @@ -94,7 +95,7 @@ stream_t* __FASTCALL__ new_stream(int type); void __FASTCALL__ free_stream(stream_t *s); stream_t* __FASTCALL__ new_memory_stream(const unsigned char* data,int len); -stream_t* __FASTCALL__ open_stream(any_t*libinput,const char* filename,int* file_format,stream_callback event_handler); +stream_t* __FASTCALL__ RND_RENAME2(open_stream)(any_t*libinput,const char* filename,int* file_format,stream_callback event_handler); extern unsigned int __FASTCALL__ stream_read_word(stream_t *s); extern unsigned int __FASTCALL__ stream_read_dword(stream_t *s); Modified: mplayerxp/libplaytree/asxparser.c =================================================================== --- mplayerxp/libplaytree/asxparser.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libplaytree/asxparser.c 2012-11-13 07:51:55 UTC (rev 352) @@ -496,7 +496,7 @@ asx_warning_attrib_required(parser,"ENTRYREF" ,"HREF" ); return NULL; } - stream=open_stream(libinput,href,&f,NULL); + stream=RND_RENAME2(open_stream)(libinput,href,&f,NULL); if(!stream) { MSG_WARN("Can't open playlist %s\n",href); return NULL; Modified: mplayerxp/libplaytree/playtreeparser.c =================================================================== --- mplayerxp/libplaytree/playtreeparser.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libplaytree/playtreeparser.c 2012-11-13 07:51:55 UTC (rev 352) @@ -365,7 +365,7 @@ MSG_V("Parsing playlist file %s...\n",file); ff=0; - stream = open_stream(libinput,file,&ff,NULL); + stream = RND_RENAME2(open_stream)(libinput,file,&ff,NULL); stream->type|=STREAMTYPE_TEXT; ret = parse_playtree(libinput,stream); free_stream(stream); Modified: mplayerxp/libvo/video_out.c =================================================================== --- mplayerxp/libvo/video_out.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libvo/video_out.c 2012-11-13 07:51:55 UTC (rev 352) @@ -150,7 +150,7 @@ MSG_INFO("\n"); } -const vo_functions_t *vo_register(vo_data_t*vo,const char *driver_name) +const vo_functions_t *RND_RENAME5(vo_register)(vo_data_t*vo,const char *driver_name) { unsigned i; if(!driver_name) video_out=video_out_drivers[0]; @@ -190,10 +190,11 @@ pthread_mutexattr_init(&attr); pthread_mutex_init(&priv->surfaces_mutex,&attr); priv->dri.num_xp_frames=1; + RND_RENAME0(rnd_fill)(vo->antiviral_hole,sizeof(vo->antiviral_hole)); return vo; } -MPXP_Rc __FASTCALL__ vo_init(vo_data_t*vo,const char *subdevice) +MPXP_Rc __FASTCALL__ RND_RENAME6(vo_init)(vo_data_t*vo,const char *subdevice) { vo_priv_t* priv=(vo_priv_t*)vo->vo_priv; MSG_DBG3("dri_vo_dbg: vo_init(%s)\n",subdevice); @@ -391,13 +392,13 @@ if((event & VO_EVENT_RESIZE) == VO_EVENT_RESIZE) { xp_core->in_resize=1; - vf_reinit_vo(priv->dri.cap.w,priv->dri.cap.h,priv->dri.cap.fourcc,1); + RND_RENAME8(vf_reinit_vo)(priv->dri.cap.w,priv->dri.cap.h,priv->dri.cap.fourcc,1); } - vf_reinit_vo(priv->dri.cap.w,priv->dri.cap.h,priv->dri.cap.fourcc,0); + RND_RENAME8(vf_reinit_vo)(priv->dri.cap.w,priv->dri.cap.h,priv->dri.cap.fourcc,0); } static int vo_inited=0; -MPXP_Rc __FASTCALL__ vo_config(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, +MPXP_Rc __FASTCALL__ RND_RENAME7(vo_config)(vo_data_t*vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format) { @@ -635,7 +636,7 @@ return priv->dri.num_xp_frames; } -MPXP_Rc __FASTCALL__ vo_draw_slice(vo_data_t*vo,const mp_image_t *mpi) +MPXP_Rc __FASTCALL__ RND_RENAME8(vo_draw_slice)(vo_data_t*vo,const mp_image_t *mpi) { vo_priv_t* priv=(vo_priv_t*)vo->vo_priv; unsigned i,_w[4],_h[4],x,y; @@ -670,7 +671,7 @@ return MPXP_False; } -void vo_select_frame(vo_data_t*vo,unsigned play_idx) +void RND_RENAME9(vo_select_frame)(vo_data_t*vo,unsigned play_idx) { MSG_DBG2("dri_vo_dbg: vo_select_frame(play_idx=%u)\n",play_idx); video_out->select_frame(vo,play_idx); @@ -890,7 +891,7 @@ mp_free(vo->vo_priv); } -MPXP_Rc __FASTCALL__ vo_control(vo_data_t*vo,uint32_t request, any_t*data) +MPXP_Rc __FASTCALL__ RND_RENAME0(vo_control)(vo_data_t*vo,uint32_t request, any_t*data) { uint32_t rval; rval=video_out->control(vo,request,data); Modified: mplayerxp/libvo/video_out.h =================================================================== --- mplayerxp/libvo/video_out.h 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/libvo/video_out.h 2012-11-13 07:51:55 UTC (rev 352) @@ -150,6 +150,7 @@ typedef struct vo_data_s { Display* mDisplay; + char antiviral_hole[RND_CHAR4]; int mScreen; Window window; GC gc; @@ -242,10 +243,10 @@ \*****************************************************/ extern vo_data_t* __FASTCALL__ vo_preinit_structs( void ); extern void vo_print_help(vo_data_t*); -extern const vo_functions_t * vo_register(vo_data_t* vo,const char *driver_name); +extern const vo_functions_t * RND_RENAME5(vo_register)(vo_data_t* vo,const char *driver_name); extern const vo_info_t* vo_get_info(vo_data_t* vo); -extern MPXP_Rc __FASTCALL__ vo_init(vo_data_t* vo,const char *subdevice_name); -extern MPXP_Rc __FASTCALL__ vo_config(vo_data_t* vo,uint32_t width, uint32_t height, uint32_t d_width, +extern MPXP_Rc __FASTCALL__ RND_RENAME6(vo_init)(vo_data_t* vo,const char *subdevice_name); +extern MPXP_Rc __FASTCALL__ RND_RENAME7(vo_config)(vo_data_t* vo,uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format); extern uint32_t __FASTCALL__ vo_query_format(vo_data_t* vo,uint32_t* fourcc,unsigned src_w,unsigned src_h); @@ -261,13 +262,13 @@ extern int vo_check_events(vo_data_t* vo); extern unsigned __FASTCALL__ vo_get_num_frames(vo_data_t* vo); -extern MPXP_Rc __FASTCALL__ vo_draw_slice(vo_data_t* vo,const mp_image_t *mpi); -extern void vo_select_frame(vo_data_t* vo,unsigned idx); +extern MPXP_Rc __FASTCALL__ RND_RENAME8(vo_draw_slice)(vo_data_t* vo,const mp_image_t *mpi); +extern void RND_RENAME9(vo_select_frame)(vo_data_t* vo,unsigned idx); extern void vo_flush_page(vo_data_t* vo,unsigned decoder_idx); extern void vo_draw_osd(vo_data_t* vo,unsigned idx); extern void vo_draw_spudec_direct(vo_data_t* vo,unsigned idx); extern void vo_uninit(vo_data_t* vo); -extern MPXP_Rc __FASTCALL__ vo_control(vo_data_t* vo,uint32_t request, any_t*data); +extern MPXP_Rc __FASTCALL__ RND_RENAME0(vo_control)(vo_data_t* vo,uint32_t request, any_t*data); extern int __FASTCALL__ vo_is_final(vo_data_t* vo); /** Contains geometry of fourcc */ Modified: mplayerxp/mplayerxp.c =================================================================== --- mplayerxp/mplayerxp.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/mplayerxp.c 2012-11-13 07:51:55 UTC (rev 352) @@ -877,14 +877,14 @@ } } MP_UNIT("vo_register"); - priv->vo_inited = (vo_register(vo_data,mp_conf.video_driver)!=NULL)?1:0; + priv->vo_inited = (RND_RENAME5(vo_register)(vo_data,mp_conf.video_driver)!=NULL)?1:0; if(!priv->vo_inited){ MSG_FATAL(MSGTR_InvalidVOdriver,mp_conf.video_driver?mp_conf.video_driver:"?"); exit_player(MSGTR_Exit_error); } MP_UNIT("vo_init"); - if(vo_init(vo_data,vo_conf.subdevice)!=MPXP_Ok) { + if(RND_RENAME6(vo_init)(vo_data,vo_conf.subdevice)!=MPXP_Ok) { MSG_FATAL("Error opening/initializing the selected video_out (-vo) device!\n"); exit_player(MSGTR_Exit_error); } @@ -903,7 +903,7 @@ mp_conf.audio_driver[i] = '\0'; } } - priv->ao_inited=(ao_register(mp_conf.audio_driver)!=NULL)?1:0; + priv->ao_inited=(RND_RENAME4(ao_register)(mp_conf.audio_driver)!=NULL)?1:0; if (!priv->ao_inited){ MSG_FATAL(MSGTR_InvalidAOdriver,mp_conf.audio_driver); exit_player(MSGTR_Exit_error); @@ -1165,15 +1165,15 @@ if(mp_conf.video_codec) { /* forced codec by name: */ MSG_INFO("Forced video codec: %s\n",mp_conf.video_codec); - mpcv_init(sh_video,mp_conf.video_codec,NULL,-1,priv->libinput); + RND_RENAME3(mpcv_init)(sh_video,mp_conf.video_codec,NULL,-1,priv->libinput); } else { int status; /* try in stability order: UNTESTED, WORKING, BUGGY, BROKEN */ if(mp_conf.video_family) MSG_INFO(MSGTR_TryForceVideoFmt,mp_conf.video_family); for(status=CODECS_STATUS__MAX;status>=CODECS_STATUS__MIN;--status){ if(mp_conf.video_family) /* try first the preferred codec family:*/ - if(mpcv_init(sh_video,NULL,mp_conf.video_family,status,priv->libinput)==MPXP_Ok) break; - if(mpcv_init(sh_video,NULL,NULL,status,priv->libinput)==MPXP_Ok) break; + if(RND_RENAME3(mpcv_init)(sh_video,NULL,mp_conf.video_family,status,priv->libinput)==MPXP_Ok) break; + if(RND_RENAME3(mpcv_init)(sh_video,NULL,NULL,status,priv->libinput)==MPXP_Ok) break; } } /* Use ffmpeg decoders as last hope */ @@ -1765,7 +1765,7 @@ if(stream_dump_type) mp_conf.s_cache_size=0; MP_UNIT("open_stream"); - if(!input_state.after_dvdmenu) stream=open_stream(priv->libinput,filename,&file_format,stream_dump_type>1?dump_stream_event_handler:mpxp_stream_event_handler); + if(!input_state.after_dvdmenu) stream=RND_RENAME2(open_stream)(priv->libinput,filename,&file_format,stream_dump_type>1?dump_stream_event_handler:mpxp_stream_event_handler); if(!stream) { // error... eof = libmpdemux_was_interrupted(PT_NEXT_ENTRY); goto goto_next_file; @@ -1798,7 +1798,7 @@ MP_UNIT("demux_open"); - if(!input_state.after_dvdmenu) priv->demuxer=demux_open(stream,file_format,mp_conf.audio_id,mp_conf.video_id,mp_conf.dvdsub_id); + if(!input_state.after_dvdmenu) priv->demuxer=RND_RENAME1(demux_open)(stream,file_format,mp_conf.audio_id,mp_conf.video_id,mp_conf.dvdsub_id); if(!priv->demuxer) goto goto_next_file; // exit_player(MSGTR_Exit_error); // ERROR priv->inited_flags|=INITED_DEMUXER; input_state.after_dvdmenu=0; @@ -1845,7 +1845,7 @@ goto dump_file; } - if(!(ao_data=ao_init(0,ao_subdevice))) { + if(!(ao_data=RND_RENAME5(ao_init)(0,ao_subdevice))) { MSG_ERR(MSGTR_CannotInitAO); sh_audio=d_audio->sh=NULL; } @@ -1853,7 +1853,7 @@ if(sh_audio){ MSG_V("Initializing audio codec...\n"); - if(mpca_init(sh_audio)!=MPXP_Ok){ + if(RND_RENAME2(mpca_init)(sh_audio)!=MPXP_Ok){ MSG_ERR(MSGTR_CouldntInitAudioCodec); sh_audio=d_audio->sh=NULL; } else { @@ -1875,7 +1875,7 @@ MP_UNIT("init_video_filters"); if(sh_video->vfilter_inited<=0) { - sh_video->vfilter=vf_init(sh_video,priv->libinput); + sh_video->vfilter=RND_RENAME7(vf_init)(sh_video,priv->libinput); sh_video->vfilter_inited=1; } if((mpxp_find_vcodec())!=0) { Modified: mplayerxp/osdep/mplib.c =================================================================== --- mplayerxp/osdep/mplib.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/osdep/mplib.c 2012-11-13 07:51:55 UTC (rev 352) @@ -6,7 +6,19 @@ * You can redistribute this file under terms and conditions * of GNU General Public licence v2. */ +#include <stdlib.h> #include "mp_config.h" #include "mplib.h" volatile unsigned long long int my_profile_start,my_profile_end,my_profile_total; + +any_t* RND_RENAME0(rnd_fill)(any_t* buffer,size_t size) +{ + unsigned i; + char ch; + for(i=0;i<size;i++) { + ch=rand()%255; + ((char *)buffer)[i]=ch; + } + return buffer; +} Modified: mplayerxp/osdep/mplib.h =================================================================== --- mplayerxp/osdep/mplib.h 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/osdep/mplib.h 2012-11-13 07:51:55 UTC (rev 352) @@ -72,4 +72,6 @@ print_backtrace(why,stack,ncalls); } +extern any_t* RND_RENAME0(rnd_fill)(any_t* buffer,size_t size); + #endif Modified: mplayerxp/postproc/af.c =================================================================== --- mplayerxp/postproc/af.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/postproc/af.c 2012-11-13 07:51:55 UTC (rev 352) @@ -96,7 +96,7 @@ /* Find filter in the dynamic filter list using it's name This function is used for finding already initialized filters */ -af_instance_t* __FASTCALL__ af_get(af_stream_t* s,const char* name) +static af_instance_t* __FASTCALL__ af_get(af_stream_t* s,const char* name) { af_instance_t* af=s->first; // Find the filter @@ -120,6 +120,7 @@ MSG_ERR(MSGTR_OutOfMemory); return NULL; } + RND_RENAME0(rnd_fill)(_new->antiviral_hole,sizeof(_new->antiviral_hole)); _new->parent=s; // Check for commandline parameters strsep(&cmdline, "="); @@ -237,7 +238,7 @@ /* Reinitializes all filters downstream from the filter given in the argument the return value is MPXP_Ok if success and MPXP_Error if failure */ -int af_reinit(af_stream_t* s, af_instance_t* af) +static int af_reinit(af_stream_t* s, af_instance_t* af) { if(!af) return MPXP_Error; @@ -353,7 +354,7 @@ format given in "s", otherwise the output fromat in the last filter will be copied "s". The return value is 0 if success and -1 if failure */ -MPXP_Rc af_init(af_stream_t* s, int force_output) +MPXP_Rc RND_RENAME7(af_init)(af_stream_t* s, int force_output) { char *af_name,*af_next; // Sanity check @@ -500,7 +501,7 @@ } // Filter data chunk through the filters in the list -mp_aframe_t* __FASTCALL__ af_play(af_stream_t* s, mp_aframe_t* data) +mp_aframe_t* __FASTCALL__ RND_RENAME8(af_play)(af_stream_t* s, mp_aframe_t* data) { af_instance_t* af=s->first; // Iterate through all filters @@ -603,7 +604,7 @@ { af_instance_t* filt = s?s->first:NULL; const char *filt_name=filt?filt->info->name:"ao2"; - if(strcmp(filt_name,"ao2")==0) return ao_control(ao_data,AOCONTROL_QUERY_FORMAT,fmt); + if(strcmp(filt_name,"ao2")==0) return RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_FORMAT,fmt); else { unsigned ifmt=mpaf_format_decode(fmt); @@ -616,7 +617,7 @@ { af_instance_t* filt = s?s->first:NULL; const char *filt_name=filt?filt->info->name:"ao2"; - if(strcmp(filt_name,"ao2")==0) return ao_control(ao_data,AOCONTROL_QUERY_RATE,rate); + if(strcmp(filt_name,"ao2")==0) return RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_RATE,rate); else { if(rate==filt->data->rate) return MPXP_True; } @@ -627,7 +628,7 @@ { af_instance_t* filt = s?s->first:NULL; const char *filt_name=filt?filt->info->name:"ao2"; - if(strcmp(filt_name,"ao2")==0) return ao_control(ao_data,AOCONTROL_QUERY_CHANNELS,nch); + if(strcmp(filt_name,"ao2")==0) return RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_CHANNELS,nch); else { if(nch==filt->data->nch) return MPXP_True; } @@ -647,11 +648,12 @@ MSG_INFO("\n"); } -af_stream_t *af_new(any_t*_parent) +af_stream_t *RND_RENAME6(af_new)(any_t*_parent) { af_stream_t *rval; rval = mp_mallocz(sizeof(af_stream_t)); rval->parent = _parent; + RND_RENAME0(rnd_fill)(rval->antiviral_hole,sizeof(rval->antiviral_hole)); return rval; } Modified: mplayerxp/postproc/af.h =================================================================== --- mplayerxp/postproc/af.h 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/postproc/af.h 2012-11-13 07:51:55 UTC (rev 352) @@ -38,6 +38,7 @@ typedef struct af_instance_s { const af_info_t* info; + char antiviral_hole[RND_CHAR6]; MPXP_Rc (* __FASTCALL__ control)(struct af_instance_s* af, int cmd, any_t* arg); void (* __FASTCALL__ uninit)(struct af_instance_s* af); mp_aframe_t* (* __FASTCALL__ play)(struct af_instance_s* af, mp_aframe_t* data,int final); @@ -83,6 +84,7 @@ // Current audio stream typedef struct af_stream_s { + char antiviral_hole[RND_CHAR7]; // The first and last filter in the list af_instance_t* first; af_instance_t* last; @@ -99,7 +101,7 @@ // Export functions */ -af_stream_t *af_new(any_t*_parent); +af_stream_t *RND_RENAME6(af_new)(any_t*_parent); /* Initialize the stream "s". This function creates a new filter list if necessary according to the values set in input and output. Input @@ -111,16 +113,11 @@ format given in "s", otherwise the output format in the last filter will be copied "s". The return value is 0 if success and -1 if failure */ -MPXP_Rc af_init(af_stream_t* s, int force_output); +MPXP_Rc RND_RENAME7(af_init)(af_stream_t* s, int force_output); // Uninit and remove all filters void af_uninit(af_stream_t* s); -/* Reinitializes all filters downstream from the filter given in the - argument the return value is MPXP_Ok if success and MPXP_Error if - failure */ -int af_reinit(af_stream_t* s, af_instance_t* af); - /* Add filter during execution. This function adds the filter "name" to the stream s. The filter will be inserted somewhere nice in the list of filters. The return value is a pointer to the new filter, @@ -130,12 +127,8 @@ // Uninit and remove the filter "af" void af_remove(af_stream_t* s, af_instance_t* af); -/* Find filter in the dynamic filter list using it's name This - function is used for finding already initialized filters */ -af_instance_t* __FASTCALL__ af_get(af_stream_t* s,const char* name); - // Filter data chunk through the filters in the list -mp_aframe_t* __FASTCALL__ af_play(af_stream_t* s, mp_aframe_t* data); +mp_aframe_t* __FASTCALL__ RND_RENAME8(af_play)(af_stream_t* s, mp_aframe_t* data); // send control to all filters, starting with the last until // one accepts the command with MPXP_Ok. Modified: mplayerxp/postproc/af_ao2.c =================================================================== --- mplayerxp/postproc/af_ao2.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/postproc/af_ao2.c 2012-11-13 07:51:55 UTC (rev 352) @@ -19,23 +19,23 @@ { unsigned i,ii; int rval; - rval=ao_control(ao_data,AOCONTROL_QUERY_RATE,irate); + rval=RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_RATE,irate); if(rval == MPXP_True) return irate; for(i=0;i<sizeof(rates)/sizeof(unsigned)-1;i++) { if(irate >= rates[i] && irate < rates[i+1]) break; } ii=i; for(;i<sizeof(rates)/sizeof(unsigned);i++) { - rval=ao_control(ao_data,AOCONTROL_QUERY_RATE,rates[i]); + rval=RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_RATE,rates[i]); if(rval == MPXP_True) return rates[i]; } i=ii; for(;i<sizeof(rates)/sizeof(unsigned);i--) { - rval=ao_control(ao_data,AOCONTROL_QUERY_RATE,rates[i]); + rval=RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_RATE,rates[i]); if(rval == MPXP_True) return rates[i]; } for(i=0;i<sizeof(rates)/sizeof(unsigned);i++) { - rval=ao_control(ao_data,AOCONTROL_QUERY_RATE,rates[i]); + rval=RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_RATE,rates[i]); if(rval == MPXP_True) return rates[i]; } return 44100; @@ -45,14 +45,14 @@ { unsigned i; int rval; - rval=ao_control(ao_data,AOCONTROL_QUERY_CHANNELS,ich); + rval=RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_CHANNELS,ich); if(rval == MPXP_True) return ich; for(i=ich>1?ich:1;i<AF_NCH;i++) { - rval=ao_control(ao_data,AOCONTROL_QUERY_CHANNELS,i); + rval=RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_CHANNELS,i); if(rval == MPXP_True) return i; } for(i=1;i<AF_NCH;i++) { - rval=ao_control(ao_data,AOCONTROL_QUERY_CHANNELS,i); + rval=RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_CHANNELS,i); if(rval == MPXP_True) return i; } return 2; @@ -87,7 +87,7 @@ { unsigned i,j; int rval; - rval=ao_control(ao_data,AOCONTROL_QUERY_FORMAT,ifmt); + rval=RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_FORMAT,ifmt); if(rval == MPXP_True) return ifmt; rval=-1; for(i=0;i<sizeof(cvt_list)/sizeof(fmt_cvt_t);i++) { @@ -97,7 +97,7 @@ i=rval; for(j=0;j<20;j++) { if(cvt_list[i].cvt_fourcc[j]==0) break; - rval=ao_control(ao_data,AOCONTROL_QUERY_FORMAT,cvt_list[i].cvt_fourcc[j]); + rval=RND_RENAME7(ao_control)(ao_data,AOCONTROL_QUERY_FORMAT,cvt_list[i].cvt_fourcc[j]); if(rval == MPXP_True) return cvt_list[i].cvt_fourcc[j]; } return AFMT_S16_LE; Modified: mplayerxp/postproc/vf.c =================================================================== --- mplayerxp/postproc/vf.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/postproc/vf.c 2012-11-13 07:51:55 UTC (rev 352) @@ -296,6 +296,7 @@ if(!strcmp(filter_list[i]->name,name)) break; } vf=mp_mallocz(sizeof(vf_instance_t)); + RND_RENAME0(rnd_fill)(vf->antiviral_hole,sizeof(vf->antiviral_hole)); vf->info=filter_list[i]; vf->next=next; vf->prev=NULL; @@ -317,7 +318,7 @@ return NULL; } -vf_instance_t* __FASTCALL__ vf_open_filter(vf_instance_t* next,sh_video_t *sh,const char *name,const char *args,any_t*libinput){ +vf_instance_t* __FASTCALL__ RND_RENAME9(vf_open_filter)(vf_instance_t* next,sh_video_t *sh,const char *name,const char *args,any_t*libinput){ if(strcmp(name,"vo")) { MSG_V("Open video filter: [%s]\n", name); } @@ -341,7 +342,7 @@ if(best) return best; // bingo, they have common csp! // ok, then try with scale: if(vf->info == &vf_info_scale) return 0; // avoid infinite recursion! - vf=vf_open_filter(vf,vf->sh,"fmtcvt",NULL,vf->libinput); + vf=RND_RENAME9(vf_open_filter)(vf,vf->sh,"fmtcvt",NULL,vf->libinput); if(!vf) return 0; // failed to init "scale" // try the preferred csp first: if(preferred && vf->query_format(vf,preferred,w,h)) best=preferred; else @@ -382,7 +383,7 @@ // let's insert the 'scale' filter, it does the job for us: vf_instance_t* vf2; if(vf->next->info==&vf_info_scale) return 0; // scale->scale - vf2=vf_open_filter(vf->next,vf->sh,"scale",NULL,vf->libinput); + vf2=RND_RENAME9(vf_open_filter)(vf->next,vf->sh,"scale",NULL,vf->libinput); if(!vf2) return 0; // shouldn't happen! vf->next=vf2; flags=vf_next_query_format(vf->next,outfmt,d_width,d_height); @@ -396,7 +397,7 @@ if(miss&VFCAP_ACCEPT_STRIDE){ // vf requires stride support but vf->next doesn't support it! // let's insert the 'expand' filter, it does the job for us: - vf_instance_t* vf2=vf_open_filter(vf->next,vf->sh,"expand",NULL,vf->libinput); + vf_instance_t* vf2=RND_RENAME9(vf_open_filter)(vf->next,vf->sh,"expand",NULL,vf->libinput); if(!vf2) return 0; // shouldn't happen! vf->next=vf2; } @@ -464,13 +465,13 @@ extern vf_cfg_t vf_cfg; static sh_video_t *sh_video; -vf_instance_t* __FASTCALL__ vf_init(sh_video_t *sh,any_t* libinput) +vf_instance_t* __FASTCALL__ RND_RENAME7(vf_init)(sh_video_t *sh,any_t* libinput) { char *vf_last=NULL,*vf_name=vf_cfg.list; char *arg; vf_instance_t* vfi=NULL,*vfi_prev=NULL,*vfi_first; sh_video=sh; - vfi=vf_open_filter(NULL,sh,"vo",NULL,libinput); + vfi=RND_RENAME9(vf_open_filter)(NULL,sh,"vo",NULL,libinput); vfi_prev=vfi; if(vf_name) while(vf_name!=vf_last){ @@ -554,7 +555,7 @@ _this=_this->next; } } -void __FASTCALL__ vf_reinit_vo(unsigned w,unsigned h,unsigned fmt,int reset_cache) +void __FASTCALL__ RND_RENAME8(vf_reinit_vo)(unsigned w,unsigned h,unsigned fmt,int reset_cache) { vf_instance_t *vf_scaler=NULL; vf_instance_t* _saved=NULL; @@ -613,7 +614,7 @@ { MSG_V("vf_reinit->config %i %i %s=> %i %i %s\n",sw,sh,vo_format_name(sfourcc),w,h,vo_format_name(fmt)); _saved=_this->prev; - vf_scaler=vf_open_filter(_this,sh_video,(w==sw&&h==sh)?"fmtcvt":"scale",NULL,_this->libinput); + vf_scaler=RND_RENAME9(vf_open_filter)(_this,sh_video,(w==sw&&h==sh)?"fmtcvt":"scale",NULL,_this->libinput); if(vf_scaler) { any_t*sfnc; Modified: mplayerxp/postproc/vf.h =================================================================== --- mplayerxp/postproc/vf.h 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/postproc/vf.h 2012-11-13 07:51:55 UTC (rev 352) @@ -30,6 +30,7 @@ typedef struct vf_instance_s { const vf_info_t* info; + char antiviral_hole[RND_CHAR5]; // funcs: int (* __FASTCALL__ config)(struct vf_instance_s* vf, int width, int height, int d_width, int d_height, @@ -86,7 +87,7 @@ VFCTRL_GET_EQUALIZER =8, /* gset color options (brightness,contrast etc) */ VFCTRL_START_FRAME =7, VFCTRL_CHANGE_RECTANGLE =9, /* Change the rectangle boundaries */ - VFCTRL_SELECT_FRAME =10, /* Tell the vo to flip pages */ + VFCTRL_RESERVED =10, /* Tell the vo to flip pages */ VFCTRL_DUPLICATE_FRAME =11, /* For encoding - encode zero-change frame */ VFCTRL_SKIP_NEXT_FRAME =12, /* For encoding - drop the next frame that passes thru */ VFCTRL_FLUSH_PAGES =13 /* For encoding - flush delayed frames */ @@ -95,8 +96,8 @@ // functions: -vf_instance_t* __FASTCALL__ vf_init(sh_video_t *sh,any_t* libinput); -void __FASTCALL__ vf_reinit_vo(unsigned w,unsigned h,unsigned fmt,int reset_cache); +vf_instance_t* __FASTCALL__ RND_RENAME7(vf_init)(sh_video_t *sh,any_t* libinput); +void __FASTCALL__ RND_RENAME8(vf_reinit_vo)(unsigned w,unsigned h,unsigned fmt,int reset_cache); void __FASTCALL__ vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h); mp_image_t* __FASTCALL__ vf_get_new_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h,unsigned idx); @@ -105,7 +106,7 @@ mp_image_t* __FASTCALL__ vf_get_new_temp_genome(vf_instance_t* vf, const mp_image_t* mpi); int __FASTCALL__ vf_query_format(vf_instance_t* vf, unsigned int fmt,unsigned width,unsigned height); -vf_instance_t* __FASTCALL__ vf_open_filter(vf_instance_t* next,sh_video_t *sh,const char *name,const char *args,any_t*libinput); +vf_instance_t* __FASTCALL__ RND_RENAME9(vf_open_filter)(vf_instance_t* next,sh_video_t *sh,const char *name,const char *args,any_t*libinput); vf_instance_t* __FASTCALL__ vf_open_encoder(vf_instance_t* next,const char *name,const char *args); unsigned int __FASTCALL__ vf_match_csp(vf_instance_t** vfp,unsigned int* list,unsigned int preferred,unsigned w,unsigned h); Modified: mplayerxp/postproc/vf_vo.c =================================================================== --- mplayerxp/postproc/vf_vo.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/postproc/vf_vo.c 2012-11-13 07:51:55 UTC (rev 352) @@ -63,7 +63,7 @@ // save vo's stride capability for the wanted colorspace: vf->default_caps=query_format(vf,outfmt,d_width,d_height);// & VFCAP_ACCEPT_STRIDE; - if(MPXP_Ok!=vo_config(vo_data,width,height,d_width,d_height,flags,"MPlayerXP",outfmt)) + if(MPXP_Ok!=RND_RENAME7(vo_config)(vo_data,width,height,d_width,d_height,flags,"MPlayerXP",outfmt)) return 0; vf->priv->is_planar=vo_describe_fourcc(outfmt,&vf->priv->vd); vf->dw=d_width; @@ -77,23 +77,15 @@ { MSG_DBG2("vf_control: %u\n",request); switch(request){ - case VFCTRL_SELECT_FRAME: - { - if(!vo_config_count) return MPXP_False; // vo not configured? - vo_select_frame(vo_data,(unsigned)data); - return MPXP_True; - } - case VFCTRL_SET_EQUALIZER: - { + case VFCTRL_SET_EQUALIZER: { vf_equalizer_t *eq=data; if(!vo_config_count) return MPXP_False; // vo not configured? - return vo_control(vo_data,VOCTRL_SET_EQUALIZER, eq); + return RND_RENAME0(vo_control)(vo_data,VOCTRL_SET_EQUALIZER, eq); } - case VFCTRL_GET_EQUALIZER: - { + case VFCTRL_GET_EQUALIZER: { vf_equalizer_t *eq=data; if(!vo_config_count) return MPXP_False; // vo not configured? - return vo_control(vo_data,VOCTRL_GET_EQUALIZER, eq); + return RND_RENAME0(vo_control)(vo_data,VOCTRL_GET_EQUALIZER, eq); } } // return video_out->control(request,data); @@ -107,7 +99,7 @@ rflags=0; if(flags) { - vo_control(vo_data,DRI_GET_SURFACE_CAPS,&dcaps); + RND_RENAME0(vo_control)(vo_data,DRI_GET_SURFACE_CAPS,&dcaps); if(dcaps.caps&DRI_CAP_UPSCALER) rflags |=VFCAP_HWSCALE_UP; if(dcaps.caps&DRI_CAP_DOWNSCALER) rflags |=VFCAP_HWSCALE_DOWN; if(rflags&(VFCAP_HWSCALE_UP|VFCAP_HWSCALE_DOWN)) rflags |= VFCAP_SWSCALE; @@ -137,7 +129,7 @@ if(!vo_config_count) return 0; // vo not configured? if(!(mpi->flags & MP_IMGFLAG_FINAL) || (vf->sh->vfilter==vf && !(mpi->flags & MP_IMGFLAG_RENDERED))) { MSG_DBG2("vf_vo_put_slice was called(%u): %u %u %u %u\n",mpi->xp_idx,mpi->x,mpi->y,mpi->w,mpi->h); - vo_draw_slice(vo_data,mpi); + RND_RENAME8(vo_draw_slice)(vo_data,mpi); } return 1; } Modified: mplayerxp/xmpcore/xmp_adecoder.c =================================================================== --- mplayerxp/xmpcore/xmp_adecoder.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/xmpcore/xmp_adecoder.c 2012-11-13 07:51:55 UTC (rev 352) @@ -267,7 +267,7 @@ for( l = 0, l2 = len, ret = 0; l < len && l2 >= audio_buffer.sh_audio->audio_out_minsize; ) { float pts; - ret = mpca_decode( audio_buffer.sh_audio, &audio_buffer.buffer[audio_buffer.head], audio_buffer.min_len, l2,blen,&pts); + ret = RND_RENAME3(mpca_decode)( audio_buffer.sh_audio, &audio_buffer.buffer[audio_buffer.head], audio_buffer.min_len, l2,blen,&pts); if( ret <= 0 ) break; Modified: mplayerxp/xmpcore/xmp_aplayer.c =================================================================== --- mplayerxp/xmpcore/xmp_aplayer.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/xmpcore/xmp_aplayer.c 2012-11-13 07:51:55 UTC (rev 352) @@ -58,7 +58,7 @@ ret=read_audio_buffer(sh_audio,&sh_audio->a_buffer[sh_audio->a_buffer_len], playsize-sh_audio->a_buffer_len,sh_audio->a_buffer_size-sh_audio->a_buffer_len,&pts); } else { - ret=mpca_decode(sh_audio,&sh_audio->a_buffer[sh_audio->a_buffer_len], + ret=RND_RENAME3(mpca_decode)(sh_audio,&sh_audio->a_buffer[sh_audio->a_buffer_len], playsize-sh_audio->a_buffer_len,sh_audio->a_buffer_size-sh_audio->a_buffer_len,sh_audio->a_buffer_size-sh_audio->a_buffer_len,&pts); } if(ret>0) sh_audio->a_buffer_len+=ret; @@ -82,7 +82,7 @@ if(xmp_test_model(XMP_Run_AudioPlayer)) dec_ahead_audio_delay=ao_get_delay(ao_data); - playsize=ao_play(ao_data,sh_audio->a_buffer,playsize,0); + playsize=RND_RENAME6(ao_play)(ao_data,sh_audio->a_buffer,playsize,0); if(playsize>0){ sh_audio->a_buffer_len-=playsize; Modified: mplayerxp/xmpcore/xmp_vdecoder.c =================================================================== --- mplayerxp/xmpcore/xmp_vdecoder.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/xmpcore/xmp_vdecoder.c 2012-11-13 07:51:55 UTC (rev 352) @@ -214,7 +214,7 @@ if(mp_conf.autoq) mpcv_set_quality(sh_video,our_quality>0?our_quality:0); } frame->flags=drop_param; - blit_frame=mpcv_decode(sh_video,frame); + blit_frame=RND_RENAME4(mpcv_decode)(sh_video,frame); MSG_DBG2("DECODER: %i[%i] %f\n",dae_curr_vdecoded(xp_core),in_size,v_pts); if(mp_data->output_quality) { if(drop_param) mpcv_set_quality(sh_video,mp_data->output_quality); Modified: mplayerxp/xmpcore/xmp_vplayer.c =================================================================== --- mplayerxp/xmpcore/xmp_vplayer.c 2012-11-13 06:22:26 UTC (rev 351) +++ mplayerxp/xmpcore/xmp_vplayer.c 2012-11-13 07:51:55 UTC (rev 352) @@ -214,7 +214,7 @@ } player_idx=dae_next_played(xp_core->video); - vo_select_frame(vo_data,player_idx); + RND_RENAME9(vo_select_frame)(vo_data,player_idx); dae_inc_played(xp_core->video); MSG_D("\ndec_ahead_main: schedule %u on screen\n",player_idx); t2=GetTimer()-t2; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |