diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-06 23:54:29 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-11-06 23:54:29 +0000 |
commit | f859d013a883bbba59901303f644fe281454a63d (patch) | |
tree | e71729f1990b98ab27a8672e92a656d622c5ab19 /libmpcodecs | |
parent | d1d7c653674e32de3a4aa47ee4068c57b288adb7 (diff) |
*HUGE* set of compiler warning fixes, unused variables removal
based on patch by Dominik Mierzejewski <dominik@rangers.eu.org>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8124 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/ad_acm.c | 4 | ||||
-rw-r--r-- | libmpcodecs/ad_qtaudio.c | 16 | ||||
-rw-r--r-- | libmpcodecs/dec_audio.c | 3 | ||||
-rw-r--r-- | libmpcodecs/dec_video.c | 2 | ||||
-rw-r--r-- | libmpcodecs/native/qtrpza.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vd_lzo.c | 4 | ||||
-rw-r--r-- | libmpcodecs/vd_vfw.c | 2 | ||||
-rw-r--r-- | libmpcodecs/ve_vfw.c | 36 | ||||
-rw-r--r-- | libmpcodecs/ve_xvid.c | 6 | ||||
-rw-r--r-- | libmpcodecs/vf_1bpp.c | 1 | ||||
-rw-r--r-- | libmpcodecs/vf_2xsai.c | 1 | ||||
-rw-r--r-- | libmpcodecs/vf_boxblur.c | 1 | ||||
-rw-r--r-- | libmpcodecs/vf_il.c | 3 | ||||
-rw-r--r-- | libmpcodecs/vf_pp.c | 4 |
14 files changed, 46 insertions, 39 deletions
diff --git a/libmpcodecs/ad_acm.c b/libmpcodecs/ad_acm.c index 32ee3798ac..a665b264c2 100644 --- a/libmpcodecs/ad_acm.c +++ b/libmpcodecs/ad_acm.c @@ -39,11 +39,13 @@ static int init(sh_audio_t *sh_audio) 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)); diff --git a/libmpcodecs/ad_qtaudio.c b/libmpcodecs/ad_qtaudio.c index bf4b39d0fe..f5dd76ec13 100644 --- a/libmpcodecs/ad_qtaudio.c +++ b/libmpcodecs/ad_qtaudio.c @@ -192,11 +192,11 @@ static int preinit(sh_audio_t *sh){ 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 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen) 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 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen) 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; diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c index df791abbf3..60d536e043 100644 --- a/libmpcodecs/dec_audio.c +++ b/libmpcodecs/dec_audio.c @@ -45,7 +45,6 @@ void afm_help(){ 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 @@ int init_audio(sh_audio_t *sh_audio,char* codecname,char* afm,int status){ 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: diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 7af07541ee..fd93031494 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -202,6 +202,8 @@ int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status){ 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: diff --git a/libmpcodecs/native/qtrpza.c b/libmpcodecs/native/qtrpza.c index 024bca5b42..6f0db5f921 100644 --- a/libmpcodecs/native/qtrpza.c +++ b/libmpcodecs/native/qtrpza.c @@ -130,7 +130,6 @@ void qt_decode_rpza(char *encoded, int encoded_size, char *decoded, int width, int height, int bytes_per_pixel) { - int i; int stream_ptr = 0; int chunk_size; unsigned char opcode; @@ -145,7 +144,6 @@ void qt_decode_rpza(char *encoded, int encoded_size, char *decoded, int width, 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; diff --git a/libmpcodecs/vd_lzo.c b/libmpcodecs/vd_lzo.c index d475b8256b..56fa36eddf 100644 --- a/libmpcodecs/vd_lzo.c +++ b/libmpcodecs/vd_lzo.c @@ -98,10 +98,8 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags) { 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) { diff --git a/libmpcodecs/vd_vfw.c b/libmpcodecs/vd_vfw.c index 9d6e82ce6e..f3f77da9a7 100644 --- a/libmpcodecs/vd_vfw.c +++ b/libmpcodecs/vd_vfw.c @@ -138,6 +138,8 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){ return CONTROL_UNKNOWN; } +extern void print_video_header(BITMAPINFOHEADER *h); + // init driver static int init(sh_video_t *sh){ HRESULT ret; diff --git a/libmpcodecs/ve_vfw.c b/libmpcodecs/ve_vfw.c index b97845d14d..868fb6a385 100644 --- a/libmpcodecs/ve_vfw.c +++ b/libmpcodecs/ve_vfw.c @@ -74,9 +74,9 @@ static BITMAPINFOHEADER* vfw_open_encoder(char *dll_name, BITMAPINFOHEADER *inpu 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 @@ static int vfw_start_encoder(BITMAPINFOHEADER *input_bih, BITMAPINFOHEADER *outp // 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 @@ static int vfw_start_encoder(BITMAPINFOHEADER *input_bih, BITMAPINFOHEADER *outp 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); diff --git a/libmpcodecs/ve_xvid.c b/libmpcodecs/ve_xvid.c index 8ffd8baf75..d3dde28039 100644 --- a/libmpcodecs/ve_xvid.c +++ b/libmpcodecs/ve_xvid.c @@ -50,6 +50,7 @@ static int const divx4_general_presets[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 @@ config(struct vf_instance_s* vf, 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"); diff --git a/libmpcodecs/vf_1bpp.c b/libmpcodecs/vf_1bpp.c index b5bbd32889..2d6a959dc9 100644 --- a/libmpcodecs/vf_1bpp.c +++ b/libmpcodecs/vf_1bpp.c @@ -165,7 +165,6 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){ } 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; diff --git a/libmpcodecs/vf_2xsai.c b/libmpcodecs/vf_2xsai.c index 243290f4b5..20db798722 100644 --- a/libmpcodecs/vf_2xsai.c +++ b/libmpcodecs/vf_2xsai.c @@ -130,7 +130,6 @@ void Super2xSaI_ex(uint8 *src, uint32 src_pitch, uint8 *dst, uint32 dst_pitch, uint32 width, uint32 height, int sbpp) { - int j; unsigned int x, y; unsigned long color[16]; diff --git a/libmpcodecs/vf_boxblur.c b/libmpcodecs/vf_boxblur.c index 2ce971a62a..a5e7f9767a 100644 --- a/libmpcodecs/vf_boxblur.c +++ b/libmpcodecs/vf_boxblur.c @@ -177,7 +177,6 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){ } static int open(vf_instance_t *vf, char* args){ - char *pos, *max; int e; vf->config=config; diff --git a/libmpcodecs/vf_il.c b/libmpcodecs/vf_il.c index 0f7e3e6625..d4e9a840db 100644 --- a/libmpcodecs/vf_il.c +++ b/libmpcodecs/vf_il.c @@ -49,7 +49,7 @@ struct vf_priv_s { /***************************************************************************/ -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 void parse(FilterParam *fp, char* args){ } static int open(vf_instance_t *vf, char* args){ - char *pos, *max; vf->put_image=put_image; // vf->get_image=get_image; diff --git a/libmpcodecs/vf_pp.c b/libmpcodecs/vf_pp.c index a09b89440f..c82ece5798 100644 --- a/libmpcodecs/vf_pp.c +++ b/libmpcodecs/vf_pp.c @@ -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" |