Mercurial > mplayer.hg
changeset 8123:9fc45fe0d444
*HUGE* set of compiler warning fixes, unused variables removal
based on patch by Dominik Mierzejewski <dominik@rangers.eu.org>
line wrap: on
line diff
--- a/cfgparser.c Wed Nov 06 23:51:17 2002 +0000 +++ b/cfgparser.c Wed Nov 06 23:54:29 2002 +0000 @@ -763,7 +763,7 @@ goto err_missing_param; if (sscanf(param, sizeof(off_t) == sizeof(int) ? - "%d%c" : "%lld%c", &tmp_off, &dummy) != 1) { + "%d%c" : "%lld%c", &tmp_off, (char *)&dummy) != 1) { mp_msg(MSGT_CFGPARSER, MSGL_ERR, "parameter must be an integer: %s\n", param); ret = ERR_OUT_OF_RANGE; goto out;
--- a/cpudetect.c Wed Nov 06 23:51:17 2002 +0000 +++ b/cpudetect.c Wed Nov 06 23:54:29 2002 +0000 @@ -12,6 +12,7 @@ #ifdef ARCH_X86 #include <stdio.h> +#include <string.h> #ifdef __FreeBSD__ #include <sys/types.h>
--- a/liba52/resample_mmx.c Wed Nov 06 23:51:17 2002 +0000 +++ b/liba52/resample_mmx.c Wed Nov 06 23:54:29 2002 +0000 @@ -13,7 +13,6 @@ static uint64_t __attribute__((aligned(8))) wm1100= 0xFFFFFFFF00000000LL; static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){ - int i; int32_t * f = (int32_t *) _f; asm volatile( "movl $-512, %%esi \n\t" @@ -51,7 +50,6 @@ } static int a52_resample_STEREO_to_2_MMX(float * _f, int16_t * s16){ - int i; int32_t * f = (int32_t *) _f; /* benchmark scores are 0.3% better with SSE but we would need to set bias=0 and premultiply it #ifdef HAVE_SSE @@ -100,7 +98,6 @@ } static int a52_resample_3F_to_5_MMX(float * _f, int16_t * s16){ - int i; int32_t * f = (int32_t *) _f; asm volatile( "movl $-1024, %%esi \n\t" @@ -156,7 +153,6 @@ } static int a52_resample_2F_2R_to_4_MMX(float * _f, int16_t * s16){ - int i; int32_t * f = (int32_t *) _f; asm volatile( "movl $-1024, %%esi \n\t" @@ -208,7 +204,6 @@ } static int a52_resample_3F_2R_to_5_MMX(float * _f, int16_t * s16){ - int i; int32_t * f = (int32_t *) _f; asm volatile( "movl $-1024, %%esi \n\t" @@ -268,7 +263,6 @@ } static int a52_resample_MONO_LFE_to_6_MMX(float * _f, int16_t * s16){ - int i; int32_t * f = (int32_t *) _f; asm volatile( "movl $-1024, %%esi \n\t" @@ -309,7 +303,6 @@ } static int a52_resample_STEREO_LFE_to_6_MMX(float * _f, int16_t * s16){ - int i; int32_t * f = (int32_t *) _f; asm volatile( "movl $-1024, %%esi \n\t" @@ -348,7 +341,6 @@ } static int a52_resample_3F_LFE_to_6_MMX(float * _f, int16_t * s16){ - int i; int32_t * f = (int32_t *) _f; asm volatile( "movl $-1024, %%esi \n\t" @@ -389,7 +381,6 @@ } static int a52_resample_2F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){ - int i; int32_t * f = (int32_t *) _f; asm volatile( "movl $-1024, %%esi \n\t" @@ -436,7 +427,6 @@ } static int a52_resample_3F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){ - int i; int32_t * f = (int32_t *) _f; asm volatile( "movl $-1024, %%esi \n\t"
--- a/libao2/ao_arts.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libao2/ao_arts.c Wed Nov 06 23:54:29 2002 +0000 @@ -44,7 +44,7 @@ int err; int frag_spec; - if(err=arts_init()) { + if( (err=arts_init()) ) { mp_msg(MSGT_AO, MSGL_ERR, "AO: [arts] %s\n", arts_error_text(err)); return 0; }
--- a/libao2/pl_eq.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libao2/pl_eq.c Wed Nov 06 23:54:29 2002 +0000 @@ -118,7 +118,7 @@ // open & setup audio device // return: 1=success 0=fail static int init(){ - int c,k = 0; + int k = 0; float F[KM] = CF; // Check input format
--- a/libao2/pl_resample.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libao2/pl_resample.c Wed Nov 06 23:54:29 2002 +0000 @@ -160,6 +160,10 @@ static void reset(){ } +/* forward declarations */ +int upsample(); +int downsample(); + // processes 'ao_plugin_data.len' bytes of 'data' // called for every block of data // FIXME: this routine needs to be optimized (it is probably possible to do a lot here)
--- a/libao2/pl_surround.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libao2/pl_surround.c Wed Nov 06 23:54:29 2002 +0000 @@ -173,7 +173,7 @@ }; // Experimental moving average dominances -static int amp_L = 0, amp_R = 0, amp_C = 0, amp_S = 0; +//static int amp_L = 0, amp_R = 0, amp_C = 0, amp_S = 0; // processes 'ao_plugin_data.len' bytes of 'data' // called for every block of data
--- a/libmpcodecs/ad_acm.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/ad_acm.c Wed Nov 06 23:54:29 2002 +0000 @@ -39,11 +39,13 @@ return 1; } +extern void print_wave_header(WAVEFORMATEX *h); + static int preinit(sh_audio_t *sh_audio) { HRESULT ret; WAVEFORMATEX *in_fmt = sh_audio->wf; - unsigned int srcsize = 0; + DWORD srcsize = 0; acm_context_t *priv; priv = malloc(sizeof(acm_context_t));
--- a/libmpcodecs/ad_qtaudio.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/ad_qtaudio.c Wed Nov 06 23:54:29 2002 +0000 @@ -192,11 +192,11 @@ WantedBufferSize=OutputFormatInfo.numChannels*OutputFormatInfo.sampleRate*2; error = SoundConverterGetBufferSizes(myConverter, WantedBufferSize,&FramesToGet,&InputBufferSize,&OutputBufferSize); - printf("SoundConverterGetBufferSizes:%i\n"); - printf("WantedBufferSize = %i\n",WantedBufferSize); - printf("InputBufferSize = %i\n",InputBufferSize); - printf("OutputBufferSize = %i\n",OutputBufferSize); - printf("FramesToGet = %i\n",FramesToGet); + printf("SoundConverterGetBufferSizes:%i\n",error); + printf("WantedBufferSize = %li\n",WantedBufferSize); + printf("InputBufferSize = %li\n",InputBufferSize); + printf("OutputBufferSize = %li\n",OutputBufferSize); + printf("FramesToGet = %li\n",FramesToGet); InFrameSize=InputBufferSize/FramesToGet; OutFrameSize=OutputBufferSize/FramesToGet; @@ -256,7 +256,7 @@ InputBufferSize=FramesToGet*InFrameSize; - printf("FramesToGet = %i (%i -> %i bytes)\n",FramesToGet, + printf("FramesToGet = %li (%li -> %li bytes)\n",FramesToGet, InputBufferSize, FramesToGet*OutFrameSize); if(InputBufferSize>sh->a_in_buffer_len){ @@ -270,8 +270,8 @@ error = SoundConverterConvertBuffer(myConverter,sh->a_in_buffer, FramesToGet,buf,&ConvertedFrames,&ConvertedBytes); printf("SoundConverterConvertBuffer:%i\n",error); - printf("ConvertedFrames = %i\n",ConvertedFrames); - printf("ConvertedBytes = %i\n",ConvertedBytes); + printf("ConvertedFrames = %li\n",ConvertedFrames); + printf("ConvertedBytes = %li\n",ConvertedBytes); InputBufferSize=(ConvertedBytes/OutFrameSize)*InFrameSize; // FIXME!! sh->a_in_buffer_len-=InputBufferSize;
--- a/libmpcodecs/dec_audio.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/dec_audio.c Wed Nov 06 23:54:29 2002 +0000 @@ -45,7 +45,6 @@ int init_audio_codec(sh_audio_t *sh_audio) { - unsigned i; // reset in/out buffer size/pointer: sh_audio->a_buffer_size=0; @@ -166,6 +165,8 @@ return 0; } +extern char *get_path(char *filename); + int init_best_audio_codec(sh_audio_t *sh_audio,char** audio_codec_list,char** audio_fm_list){ char* ac_l_default[2]={"",(char*)NULL}; // hack:
--- a/libmpcodecs/dec_video.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/dec_video.c Wed Nov 06 23:54:29 2002 +0000 @@ -202,6 +202,8 @@ return 0; } +extern char *get_path(char *filename); + int init_best_video_codec(sh_video_t *sh_video,char** video_codec_list,char** video_fm_list){ char* vc_l_default[2]={"",(char*)NULL}; // hack:
--- a/libmpcodecs/native/qtrpza.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/native/qtrpza.c Wed Nov 06 23:54:29 2002 +0000 @@ -130,7 +130,6 @@ int height, int bytes_per_pixel) { - int i; int stream_ptr = 0; int chunk_size; unsigned char opcode; @@ -145,7 +144,6 @@ int pixel_ptr = 0; int pixel_x, pixel_y; int row_inc = bytes_per_pixel * (width - 4); - int max_height = row_inc * height; int block_x_inc = bytes_per_pixel * 4; int block_y_inc = bytes_per_pixel * width; int block_ptr;
--- a/libmpcodecs/vd_lzo.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/vd_lzo.c Wed Nov 06 23:54:29 2002 +0000 @@ -98,10 +98,8 @@ { static int init_done = 0; int r; - int cb = 1; - int cr = 2; mp_image_t* mpi; - int w, h; + int w; lzo_context_t *priv = sh->context; if (len <= 0) {
--- a/libmpcodecs/vd_vfw.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/vd_vfw.c Wed Nov 06 23:54:29 2002 +0000 @@ -138,6 +138,8 @@ return CONTROL_UNKNOWN; } +extern void print_video_header(BITMAPINFOHEADER *h); + // init driver static int init(sh_video_t *sh){ HRESULT ret;
--- a/libmpcodecs/ve_vfw.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/ve_vfw.c Wed Nov 06 23:54:29 2002 +0000 @@ -74,9 +74,9 @@ ICINFO icinfo; ret = ICGetInfo(encoder_hic, &icinfo, sizeof(ICINFO)); - printf("%d - %d - %d\n", ret, icinfo.dwSize, sizeof(ICINFO)); -printf("Compressor type: %.4x\n", icinfo.fccType); -printf("Compressor subtype: %.4x\n", icinfo.fccHandler); + printf("%ld - %ld - %d\n", ret, icinfo.dwSize, sizeof(ICINFO)); +printf("Compressor type: %.4lx\n", icinfo.fccType); +printf("Compressor subtype: %.4lx\n", icinfo.fccHandler); printf("Compressor flags: %lu, version %lu, ICM version: %lu\n", icinfo.dwFlags, icinfo.dwVersion, icinfo.dwVersionICM); //printf("Compressor name: %s\n", icinfo.szName); @@ -130,21 +130,21 @@ // if(verbose) { printf("Starting compression:\n"); printf(" Input format:\n"); - printf(" biSize %ld\n", input_bih->biSize); - printf(" biWidth %ld\n", input_bih->biWidth); - printf(" biHeight %ld\n", input_bih->biHeight); + printf(" biSize %d\n", input_bih->biSize); + printf(" biWidth %d\n", input_bih->biWidth); + printf(" biHeight %d\n", input_bih->biHeight); printf(" biPlanes %d\n", input_bih->biPlanes); printf(" biBitCount %d\n", input_bih->biBitCount); - printf(" biCompression 0x%lx ('%.4s')\n", input_bih->biCompression, (char *)&input_bih->biCompression); - printf(" biSizeImage %ld\n", input_bih->biSizeImage); + printf(" biCompression 0x%x ('%.4s')\n", input_bih->biCompression, (char *)&input_bih->biCompression); + printf(" biSizeImage %d\n", input_bih->biSizeImage); printf(" Output format:\n"); - printf(" biSize %ld\n", output_bih->biSize); - printf(" biWidth %ld\n", output_bih->biWidth); - printf(" biHeight %ld\n", output_bih->biHeight); + printf(" biSize %d\n", output_bih->biSize); + printf(" biWidth %d\n", output_bih->biWidth); + printf(" biHeight %d\n", output_bih->biHeight); printf(" biPlanes %d\n", output_bih->biPlanes); printf(" biBitCount %d\n", output_bih->biBitCount); - printf(" biCompression 0x%lx ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression); - printf(" biSizeImage %ld\n", output_bih->biSizeImage); + printf(" biCompression 0x%x ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression); + printf(" biSizeImage %d\n", output_bih->biSizeImage); // } output_bih->biWidth=input_bih->biWidth; @@ -165,13 +165,13 @@ mp_msg(MSGT_WIN32,MSGL_V,"ICCompressBegin OK\n"); printf(" Output format after query/begin:\n"); - printf(" biSize %ld\n", output_bih->biSize); - printf(" biWidth %ld\n", output_bih->biWidth); - printf(" biHeight %ld\n", output_bih->biHeight); + printf(" biSize %d\n", output_bih->biSize); + printf(" biWidth %d\n", output_bih->biWidth); + printf(" biHeight %d\n", output_bih->biHeight); printf(" biPlanes %d\n", output_bih->biPlanes); printf(" biBitCount %d\n", output_bih->biBitCount); - printf(" biCompression 0x%lx ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression); - printf(" biSizeImage %ld\n", output_bih->biSizeImage); + printf(" biCompression 0x%x ('%.4s')\n", output_bih->biCompression, (char *)&output_bih->biCompression); + printf(" biSizeImage %d\n", output_bih->biSizeImage); encoder_buf_size=input_bih->biSizeImage; encoder_buf=malloc(encoder_buf_size);
--- a/libmpcodecs/ve_xvid.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/ve_xvid.c Wed Nov 06 23:54:29 2002 +0000 @@ -50,6 +50,7 @@ }; extern char* passtmpfile; +extern void mencoder_write_chunk(aviwrite_stream_t *s,int len,unsigned int flags); static int xvidenc_pass = 0; static int xvidenc_quality = sizeof(divx4_motion_presets) / sizeof(divx4_motion_presets[0]) - 1; /* best quality */ @@ -136,7 +137,10 @@ enc_param.rc_buffer = xvidenc_rc_buffer; enc_param.min_quantizer = xvidenc_min_quantizer; enc_param.max_quantizer = xvidenc_max_quantizer; - enc_param.max_key_interval = xvidenc_max_key_interval; + if( xvidenc_max_key_interval > 0 ) + enc_param.max_key_interval = xvidenc_max_key_interval; + else + enc_param.max_key_interval = 10 * enc_param.fbase / enc_param.fincr; switch (xvid_encore(NULL, XVID_ENC_CREATE, &enc_param, NULL)) { case XVID_ERR_FAIL: mp_msg(MSGT_MENCODER,MSGL_ERR, "xvid: encoder creation failed\n");
--- a/libmpcodecs/vf_1bpp.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/vf_1bpp.c Wed Nov 06 23:54:29 2002 +0000 @@ -165,7 +165,6 @@ } static int open(vf_instance_t *vf, char* args){ - unsigned int i; vf->config=config; vf->put_image=put_image; vf->query_format=query_format;
--- a/libmpcodecs/vf_2xsai.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/vf_2xsai.c Wed Nov 06 23:54:29 2002 +0000 @@ -130,7 +130,6 @@ uint8 *dst, uint32 dst_pitch, uint32 width, uint32 height, int sbpp) { - int j; unsigned int x, y; unsigned long color[16];
--- a/libmpcodecs/vf_boxblur.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/vf_boxblur.c Wed Nov 06 23:54:29 2002 +0000 @@ -177,7 +177,6 @@ } static int open(vf_instance_t *vf, char* args){ - char *pos, *max; int e; vf->config=config;
--- a/libmpcodecs/vf_il.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/vf_il.c Wed Nov 06 23:54:29 2002 +0000 @@ -49,7 +49,7 @@ /***************************************************************************/ -static int interleave(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int srcStride, int interleave, int swap){ +static void interleave(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int srcStride, int interleave, int swap){ const int a= swap; const int b= 1-a; const int m= h>>1; @@ -124,7 +124,6 @@ } static int open(vf_instance_t *vf, char* args){ - char *pos, *max; vf->put_image=put_image; // vf->get_image=get_image;
--- a/libmpcodecs/vf_pp.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpcodecs/vf_pp.c Wed Nov 06 23:54:29 2002 +0000 @@ -8,6 +8,10 @@ #include "../mp_msg.h" #include "../cpudetect.h" +#ifdef HAVE_MALLOC_H +#include <malloc.h> +#endif + #include "img_format.h" #include "mp_image.h" #include "vf.h"
--- a/libmpdemux/aviprint.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdemux/aviprint.c Wed Nov 06 23:54:29 2002 +0000 @@ -64,7 +64,7 @@ if(h->wFormatTag==0x55 && h->cbSize>=12){ MPEGLAYER3WAVEFORMAT* h2=(MPEGLAYER3WAVEFORMAT *)h; printf("mp3.wID=%d\n",h2->wID); - printf("mp3.fdwFlags=0x%X\n",h2->fdwFlags); + printf("mp3.fdwFlags=0x%lX\n",h2->fdwFlags); printf("mp3.nBlockSize=%d\n",h2->nBlockSize); printf("mp3.nFramesPerBlock=%d\n",h2->nFramesPerBlock); printf("mp3.nCodecDelay=%d\n",h2->nCodecDelay); @@ -83,13 +83,13 @@ void print_video_header(BITMAPINFOHEADER *h){ printf("======= VIDEO Format ======\n"); - printf(" biSize %ld\n", h->biSize); - printf(" biWidth %ld\n", h->biWidth); - printf(" biHeight %ld\n", h->biHeight); + printf(" biSize %d\n", h->biSize); + printf(" biWidth %d\n", h->biWidth); + printf(" biHeight %d\n", h->biHeight); printf(" biPlanes %d\n", h->biPlanes); printf(" biBitCount %d\n", h->biBitCount); - printf(" biCompression %ld='%.4s'\n", h->biCompression, (char *)&h->biCompression); - printf(" biSizeImage %ld\n", h->biSizeImage); + printf(" biCompression %d='%.4s'\n", h->biCompression, (char *)&h->biCompression); + printf(" biSizeImage %d\n", h->biSizeImage); printf("===========================\n"); }
--- a/libmpdemux/demux_asf.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdemux/demux_asf.c Wed Nov 06 23:54:29 2002 +0000 @@ -232,7 +232,7 @@ unsigned int rlen; // int len; - unsigned int time2; + unsigned int time2=0; int keyframe=0; if(p>=p_end) mp_msg(MSGT_DEMUX,MSGL_V,"Warning! invalid packet 1, sig11 coming soon...\n"); @@ -344,6 +344,9 @@ #include "stheader.h" +extern void resync_audio_stream(sh_audio_t *sh_audio); +extern void skip_audio_frame(sh_audio_t *sh_audio); + void demux_seek_asf(demuxer_t *demuxer,float rel_seek_secs,int flags){ demux_stream_t *d_audio=demuxer->audio; demux_stream_t *d_video=demuxer->video;
--- a/libmpdemux/demux_audio.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdemux/demux_audio.c Wed Nov 06 23:54:29 2002 +0000 @@ -28,6 +28,7 @@ extern void free_sh_audio(sh_audio_t* sh); extern void resync_audio_stream(sh_audio_t *sh_audio); +extern void print_wave_header(WAVEFORMATEX *h); int hr_mp3_seek = 0;
--- a/libmpdemux/demux_avi.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdemux/demux_avi.c Wed Nov 06 23:54:29 2002 +0000 @@ -566,6 +566,7 @@ } //extern float initial_pts_delay; +extern void resync_audio_stream(sh_audio_t *sh_audio); void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,int flags){ avi_priv_t *priv=demuxer->priv;
--- a/libmpdemux/demux_mpg.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdemux/demux_mpg.c Wed Nov 06 23:54:29 2002 +0000 @@ -345,6 +345,9 @@ return 1; } +extern void resync_audio_stream(sh_audio_t *sh_audio); +extern void skip_audio_frame(sh_audio_t *sh_audio); + void demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,int flags){ demux_stream_t *d_audio=demuxer->audio; demux_stream_t *d_video=demuxer->video;
--- a/libmpdemux/demux_ogg.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdemux/demux_ogg.c Wed Nov 06 23:54:29 2002 +0000 @@ -440,6 +440,9 @@ } +extern void print_wave_header(WAVEFORMATEX *h); +extern void print_video_header(BITMAPINFOHEADER *h); + /// Open an ogg physical stream int demux_ogg_open(demuxer_t* demuxer) { ogg_demuxer_t* ogg_d; @@ -869,6 +872,8 @@ } +extern void resync_audio_stream(sh_audio_t *sh_audio); + void demux_ogg_seek(demuxer_t *demuxer,float rel_seek_secs,int flags) { ogg_demuxer_t* ogg_d = demuxer->priv; ogg_sync_state* sync = &ogg_d->sync;
--- a/libmpdemux/demux_real.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdemux/demux_real.c Wed Nov 06 23:54:29 2002 +0000 @@ -660,6 +660,8 @@ }// goto loop; } +extern void print_wave_header(WAVEFORMATEX *h); + void demux_open_real(demuxer_t* demuxer) { real_priv_t* priv = demuxer->priv;
--- a/libmpdemux/demuxer.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdemux/demuxer.c Wed Nov 06 23:54:29 2002 +0000 @@ -522,6 +522,7 @@ extern void demux_open_y4m(demuxer_t *demuxer); extern int roq_check_file(demuxer_t *demuxer); extern int pva_check_file(demuxer_t * demuxer); +extern demuxer_t * demux_open_pva(demuxer_t * demuxer); extern int real_check_file(demuxer_t *demuxer); extern void demux_open_real(demuxer_t *demuxer); extern int nuv_check_file(demuxer_t *demuxer); @@ -531,6 +532,7 @@ extern int demux_rawaudio_open(demuxer_t* demuxer); extern int smjpeg_check_file(demuxer_t *demuxer); extern int demux_open_smjpeg(demuxer_t* demuxer); +extern int bmp_check_file(demuxer_t *demuxer); extern demuxer_t* init_avi_with_ogg(demuxer_t* demuxer);
--- a/libmpdemux/open.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdemux/open.c Wed Nov 06 23:54:29 2002 +0000 @@ -22,6 +22,7 @@ #ifdef STREAMING #include "url.h" #include "network.h" +extern int streaming_start( stream_t *stream, int *demuxer_type, URL_t *url); #ifdef STREAMING_LIVE_DOT_COM #include "demux_rtp.h" int isSDPFile = 0; @@ -531,7 +532,7 @@ int dvd_parse_chapter_range(struct config *conf, const char *range){ const char *s; char *t; - conf; /* prevent warning from GCC */ +/* conf; prevent warning from GCC */ s = range; dvd_chapter = 1; dvd_last_chapter = 0;
--- a/libmpdemux/tv.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdemux/tv.c Wed Nov 06 23:54:29 2002 +0000 @@ -108,6 +108,10 @@ return 1; } + /* forward declarations */ +int tv_set_freq(tvi_handle_t *tvh, unsigned long freq); +int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq); + static int open_tv(tvi_handle_t *tvh) { int i;
--- a/libmpdemux/tvi_def.h Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdemux/tvi_def.h Wed Nov 06 23:54:29 2002 +0000 @@ -1,4 +1,5 @@ #include <stdlib.h> /* malloc */ +#include <string.h> /* memset */ static int init(priv_t *priv); static int uninit(priv_t *priv);
--- a/libmpdvdkit2/css.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdvdkit2/css.c Wed Nov 06 23:54:29 2002 +0000 @@ -301,7 +301,7 @@ if(dvdcss->psz_cache){ int fd; key_file=malloc(strlen(dvdcss->psz_cache)+12+4); - sprintf(key_file,"%s/%0.10x",dvdcss->psz_cache,i_block); + sprintf(key_file,"%s/%.10x",dvdcss->psz_cache,i_block); if ( (fd=open( key_file,O_RDONLY ) ) > 0 ){ if(read(fd, p_title_key, 5)==5){ // success!
--- a/libmpdvdkit2/libdvdcss.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libmpdvdkit2/libdvdcss.c Wed Nov 06 23:54:29 2002 +0000 @@ -269,7 +269,7 @@ /* if the CACHE is enabled, extract some unique disc ID */ if(dvdcss_cache_dir){ char* disc_id=NULL; - char title_name[64]; + /*char title_name[64];*/ char sector[DVDCSS_BLOCK_SIZE]; // 32768+40 -> disc title (32 uppercase chars) // 32768+813 -> disc manufacturing date + serial no (16 digit number) @@ -289,14 +289,14 @@ for ( i=0;i<16;i++ ) if ( ( title_name[i] < '0' )||( title_name[i] > '9' ) ){ disc_id=malloc(16+4); - sprintf( disc_id,"%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X",title_name[0],title_name[1],title_name[2],title_name[3],title_name[4],title_name[5],title_name[6],title_name[7] ); + sprintf( disc_id,"%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X",title_name[0],title_name[1],title_name[2],title_name[3],title_name[4],title_name[5],title_name[6],title_name[7] ); break; } if(!disc_id) disc_id=strdup(title_name); } if(disc_id){ // yeah, we have a disc name/id, let's set up cache path: - char* dir; + /*char* dir;*/ dvdcss->psz_cache = malloc(strlen(dvdcss_cache_dir)+strlen(disc_id)+4); sprintf(dvdcss->psz_cache,"%s/%s",dvdcss_cache_dir,disc_id); mkdir( dvdcss->psz_cache,493 );
--- a/libvo/aclib.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/aclib.c Wed Nov 06 23:54:29 2002 +0000 @@ -9,6 +9,7 @@ */ #include <stddef.h> #include "../cpudetect.h" +#include "fastmemcpy.h" #define BLOCK_SIZE 4096 #define CONFUSION_FACTOR 0 @@ -177,6 +178,7 @@ #endif #endif //!RUNTIME_CPUDETECT + return to; } #endif /* use fastmemcpy */
--- a/libvo/font_load_ft.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/font_load_ft.c Wed Nov 06 23:54:29 2002 +0000 @@ -732,7 +732,7 @@ int inbytesleft = 1; int outbytesleft = sizeof(FT_ULong); - size_t count = iconv(*cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); + iconv(*cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); /* convert unicode BigEndian -> MachineEndian */ o = be2me_32(o); @@ -785,7 +785,9 @@ } static int prepare_charset_unicode(FT_Face face, FT_ULong *charset, FT_ULong *charcodes) { +#ifdef HAVE_FREETYPE21 FT_ULong charcode; +#endif FT_UInt gindex; int i,j;
--- a/libvo/geometry.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/geometry.c Wed Nov 06 23:54:29 2002 +0000 @@ -2,7 +2,9 @@ #include "geometry.h" #include "../mp_msg.h" +// #include "../mplayer.h" /* exit_player() */ #include <string.h> +#include <stdlib.h> /* strtol */ /* A string of the form xpos[%]:ypos[%] */ char *vo_geometry = NULL; @@ -53,7 +55,7 @@ return geometry_error(); } - if(*colpos != '\0') + if(*colpos != '\0') { if(vo_geometry[glen - 1] == '%') { if(!get_num(colpos + 1, &yper, vo_geometry + glen - 1)) return geometry_error(); @@ -61,6 +63,7 @@ if(!get_num(colpos + 1, ypos, vo_geometry + glen)) return geometry_error(); } + } if(xper) *xpos = (scrw - vidw) * ((float)xper / 100.0);
--- a/libvo/mga_common.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/mga_common.c Wed Nov 06 23:54:29 2002 +0000 @@ -16,7 +16,10 @@ static uint8_t *vid_data, *frames[4]; static int f = -1; -static uint32_t drwX,drwY,drwWidth,drwHeight,drwBorderWidth,drwDepth; +static uint32_t drwX,drwY,drwWidth,drwHeight; +#ifdef VO_XMGA +static uint32_t drwBorderWidth,drwDepth; +#endif static uint32_t drwcX,drwcY,dwidth,dheight; static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){ @@ -324,7 +327,7 @@ case VOCTRL_SET_PANSCAN: if ( vo_fs && ( vo_panscan != vo_panscan_amount ) ) // || ( !vo_fs && vo_panscan_amount ) ) { - int old_y = vo_panscan_y; +// int old_y = vo_panscan_y; panscan_calc(); // if ( old_y != vo_panscan_y ) set_window();
--- a/libvo/sub.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/sub.c Wed Nov 06 23:54:29 2002 +0000 @@ -4,6 +4,10 @@ #include <string.h> #include "config.h" +#ifdef HAVE_MALLOC_H +#include <malloc.h> +#endif + #include "mp_msg.h" #include "video_out.h" #include "font_load.h" @@ -434,7 +438,6 @@ inline static void vo_update_spudec_sub(mp_osd_obj_t* obj, int dxs, int dys) { unsigned int bbox[4]; - int i; spudec_calc_bbox(vo_spudec, dxs, dys, bbox); obj->bbox.x1 = bbox[0]; obj->bbox.x2 = bbox[1];
--- a/libvo/vo_dga.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/vo_dga.c Wed Nov 06 23:54:29 2002 +0000 @@ -246,9 +246,6 @@ static int vo_dga_src_offset=0; // offset in src static int vo_dga_vp_offset=0; // offset in dest static int vo_dga_bytes_per_line; // bytes per line to copy -static int vo_dga_src_skip; // bytes to skip after copying one - // line - // (not supported yet) in src static int vo_dga_vp_skip; // dto. for dest static int vo_dga_lines; // num of lines to copy static int vo_dga_hw_mode = 0; // index in mode list that is actually @@ -333,7 +330,6 @@ static uint32_t draw_frame( uint8_t *src[] ){ int vp_skip = vo_dga_vp_skip; - int lpl = vo_dga_bytes_per_line >> 2; int numlines = vo_dga_lines; char *s, *d; @@ -366,7 +362,6 @@ case VDM_CONV_15TO16: { int i; - char *e; for(i=0; i< vo_dga_lines; i++){ rgb15to16( s, d, vo_dga_bytes_per_line); d+=vo_dga_bytes_per_line; @@ -400,7 +395,7 @@ static void check_events(void) { - int e=vo_x11_check_events(mDisplay); + vo_x11_check_events(mDisplay); } //---------------------------------------------------------
--- a/libvo/vo_dxr3.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/vo_dxr3.c Wed Nov 06 23:54:29 2002 +0000 @@ -108,9 +108,11 @@ #include <stdio.h> #include <time.h> #include <math.h> -#include <malloc.h> #include "config.h" +#ifdef HAVE_MALLOC_H +#include <malloc.h> +#endif #include "fastmemcpy.h" #include "video_out.h"
--- a/libvo/vo_gif89a.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/vo_gif89a.c Wed Nov 06 23:54:29 2002 +0000 @@ -120,6 +120,9 @@ return &vo_info; } +/* forward declaration */ +int gif_reduce(int width, int height, unsigned char *source, unsigned char *destination, unsigned char *palette); + static uint32_t draw_frame(uint8_t * src[]) { uint8_t *use_data;
--- a/libvo/vo_gl2.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/vo_gl2.c Wed Nov 06 23:54:29 2002 +0000 @@ -15,6 +15,7 @@ #include "config.h" #include "video_out.h" #include "video_out_internal.h" +#include "sub.h" LIBVO_EXTERN(gl2) @@ -61,14 +62,6 @@ //static int texture_id=1; static GLXContext wsGLXContext; -static int wsGLXAttrib[] = { GLX_RGBA, - GLX_RED_SIZE,1, - GLX_GREEN_SIZE,1, - GLX_BLUE_SIZE,1, - GLX_ALPHA_SIZE,0, - GLX_DOUBLEBUFFER, - None }; - static uint32_t image_width; static uint32_t image_height; @@ -606,7 +599,7 @@ template.screen = scr; vi_list = XGetVisualInfo(dpy, VisualScreenMask, &template, &vi_num); if (!vi_list) return -1; - best_weight = 1000000; + best_weight = 1000000; best_i=0; for (i = 0; i < vi_num; i++) { int val, res, w = 0; /* of course, the visual must support OpenGL rendering... */
--- a/libvo/vo_null.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/vo_null.c Wed Nov 06 23:54:29 2002 +0000 @@ -23,6 +23,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <errno.h> #include "config.h" #include "video_out.h"
--- a/libvo/vo_sdl.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/vo_sdl.c Wed Nov 06 23:54:29 2002 +0000 @@ -1139,8 +1139,6 @@ { struct sdl_priv_s *priv = &sdl_priv; uint8_t *dst; - uint8_t *src; - int i; SDL_OVR_LOCK(-1) @@ -1195,7 +1193,6 @@ struct sdl_priv_s *priv = &sdl_priv; SDL_Event event; SDLKey keypressed = 0; - static int modifiers = 0; /* Poll the waiting SDL Events */ while ( SDL_PollEvent(&event) ) {
--- a/libvo/vo_tdfxfb.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/vo_tdfxfb.c Wed Nov 06 23:54:29 2002 +0000 @@ -43,6 +43,7 @@ #include "video_out_internal.h" #include "drivers/3dfx.h" #include "aspect.h" +#include "sub.h" LIBVO_EXTERN(tdfxfb)
--- a/libvo/vo_xvidix.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/vo_xvidix.c Wed Nov 06 23:54:29 2002 +0000 @@ -195,7 +195,7 @@ uint32_t d_height, uint32_t flags, char *title, uint32_t format) { XVisualInfo vinfo; - XSizeHints hint; +// XSizeHints hint; XSetWindowAttributes xswa; unsigned long xswamask; XWindowAttributes attribs;
--- a/libvo/vosub_vidix.h Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/vosub_vidix.h Wed Nov 06 23:54:29 2002 +0000 @@ -21,6 +21,7 @@ int vidix_start(void); int vidix_stop(void); void vidix_term( void ); +uint32_t vidix_control(uint32_t request, void *data, ...); uint32_t vidix_query_fourcc(unsigned fourcc); uint32_t vidix_draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int y);
--- a/libvo/x11_common.c Wed Nov 06 23:51:17 2002 +0000 +++ b/libvo/x11_common.c Wed Nov 06 23:54:29 2002 +0000 @@ -1103,6 +1103,7 @@ else if (!strcasecmp(name, "contrast")) *value = vo_contrast; else if (!strcasecmp(name, "gamma")) *value = vo_gamma; else return VO_NOTIMPL; + return VO_TRUE; }
--- a/mencoder.c Wed Nov 06 23:51:17 2002 +0000 +++ b/mencoder.c Wed Nov 06 23:54:29 2002 +0000 @@ -289,6 +289,7 @@ aviwrite_write_chunk(muxer,s,muxer_f,len,flags); } +extern void print_wave_header(WAVEFORMATEX *h); int main(int argc,char* argv[]){ @@ -684,7 +685,7 @@ mux_a->h.dwScale=mux_a->h.dwSampleSize; mux_a->h.dwRate=mux_a->wf->nAvgBytesPerSec; } - printf("audiocodec: framecopy (format=%x chans=%d rate=%d bits=%d bps=%d sample=%d)\n", + printf("audiocodec: framecopy (format=%x chans=%d rate=%ld bits=%d bps=%ld sample=%ld)\n", mux_a->wf->wFormatTag, mux_a->wf->nChannels, mux_a->wf->nSamplesPerSec, mux_a->wf->wBitsPerSample, mux_a->wf->nAvgBytesPerSec, mux_a->h.dwSampleSize); break; @@ -1194,7 +1195,7 @@ mux_a->h.dwRate=mux_a->wf->nAvgBytesPerSec; mux_a->h.dwScale=1; mux_a->wf->nBlockAlign=1; - printf("\n\nCBR audio: %d bytes/sec, %d bytes/block\n", + printf("\n\nCBR audio: %ld bytes/sec, %d bytes/block\n", mux_a->h.dwRate,((MPEGLAYER3WAVEFORMAT*)(mux_a->wf))->nBlockSize); } #endif
--- a/mplayer.c Wed Nov 06 23:51:17 2002 +0000 +++ b/mplayer.c Wed Nov 06 23:54:29 2002 +0000 @@ -129,6 +129,8 @@ #include "libmpcodecs/dec_video.h" //#include "libmpcodecs/vf.h" +extern void vf_list_plugins(); + //**************************************************************************// //**************************************************************************// @@ -381,6 +383,10 @@ current_module=NULL; } +#ifdef X11_FULLSCREEN +extern void vo_uninit( void ); +#endif + void exit_player(char* how){ uninit_player(INITED_ALL);
--- a/postproc/rgb2rgb.c Wed Nov 06 23:51:17 2002 +0000 +++ b/postproc/rgb2rgb.c Wed Nov 06 23:54:29 2002 +0000 @@ -13,6 +13,7 @@ #include "../cpudetect.h" #include "../mangle.h" #include "../bswap.h" +#include "../libvo/fastmemcpy.h" #ifdef ARCH_X86 #define CAN_COMPILE_X86_ASM
--- a/sub_cc.c Wed Nov 06 23:51:17 2002 +0000 +++ b/sub_cc.c Wed Nov 06 23:54:29 2002 +0000 @@ -15,6 +15,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include "sub_cc.h"
--- a/subreader.c Wed Nov 06 23:51:17 2002 +0000 +++ b/subreader.c Wed Nov 06 23:54:29 2002 +0000 @@ -243,7 +243,7 @@ char *curptr=current->text[i]=(char *)malloc (len+1); if (!current->text[i]) return ERR; //strncpy (current->text[i], line, len); current->text[i][len]='\0'; - for(j; j<len; j++) { + for(; j<len; j++) { /* let's filter html tags ::atmos */ if(line[j]=='>') { skip=0;
--- a/vidix/drivers/mga_vid.c Wed Nov 06 23:51:17 2002 +0000 +++ b/vidix/drivers/mga_vid.c Wed Nov 06 23:54:29 2002 +0000 @@ -777,7 +777,7 @@ return(EFAULT); } mga_src_base &= (~0xFFFF); /* 64k boundary */ - if (mga_verbose > 1) printf("[mga] YUV buffer base: %p\n", mga_src_base); + if (mga_verbose > 1) printf("[mga] YUV buffer base: %#x\n", mga_src_base); config->dga_addr = mga_mem_base + mga_src_base; @@ -1325,7 +1325,7 @@ } } - if (mga_verbose > 1) printf("[mga] hardware addresses: mmio: %p, framebuffer: %p\n", + if (mga_verbose > 1) printf("[mga] hardware addresses: mmio: %#x, framebuffer: %#x\n", pci_info.base1, pci_info.base0); mga_mmio_base = map_phys_mem(pci_info.base1,0x4000);