Mercurial > mplayer.hg
changeset 7472:c4434bdf6e51
tons of warning fixes, also some 10l bugfixes, including Dominik's PVA bug
line wrap: on
line diff
--- a/cfgparser.c Sun Sep 22 00:43:14 2002 +0000 +++ b/cfgparser.c Sun Sep 22 02:33:28 2002 +0000 @@ -744,7 +744,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, &dummy) != 1) { mp_msg(MSGT_CFGPARSER, MSGL_ERR, "parameter must be an integer: %s\n", param); ret = ERR_OUT_OF_RANGE; goto out;
--- a/libao2/ao_mpegpes.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libao2/ao_mpegpes.c Sun Sep 22 02:33:28 2002 +0000 @@ -1,5 +1,6 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #ifdef HAVE_DVB #include <sys/ioctl.h> #endif
--- a/libao2/ao_null.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libao2/ao_null.c Sun Sep 22 02:33:28 2002 +0000 @@ -19,7 +19,7 @@ struct timeval last_tv; int buffer; -static int drain(){ +static void drain(){ struct timeval now_tv; int temp, temp2;
--- a/libao2/ao_oss.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libao2/ao_oss.c Sun Sep 22 02:33:28 2002 +0000 @@ -55,7 +55,7 @@ case AOCONTROL_SET_VOLUME: { ao_control_vol_t *vol = (ao_control_vol_t *)arg; - int fd, v, mcmd, devs; + int fd, v, devs; if(ao_data.format == AFMT_AC3) return CONTROL_TRUE;
--- a/libao2/ao_plugin.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libao2/ao_plugin.c Sun Sep 22 02:33:28 2002 +0000 @@ -148,15 +148,15 @@ ao_plugin_data.delay_mult=1; ao_plugin_data.delay_fix=0; - for(i=0;i<NPL,plugin(i);i++){ + for(i=0;i<NPL && plugin(i);i++){ use_plugin[i]=plugin(i)->init(); if(!use_plugin[i]) plugin(i)->uninit(); } npl=i; - for(i=0;i<npl,plugin(i);i++) + for(i=0;i<npl && plugin(i);i++) if(!use_plugin[i+unused]){ unused++; - for(x=i;x<npl,plugin(x+1);x++) plugin(x)=plugin(x+1); + for(x=i;x<npl && plugin(x+1);x++) plugin(x)=plugin(x+1); plugin(x)=NULL; npl--; i--;
--- a/libao2/pl_delay.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libao2/pl_delay.c Sun Sep 22 02:33:28 2002 +0000 @@ -55,7 +55,6 @@ // open & setup audio device // return: 1=success 0=fail static int init(){ - int i=0; float time_delay; // The time in [s] this plugin delays the output data /* If the output format of any of the below parameters differs from
--- a/libao2/pl_resample.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libao2/pl_resample.c Sun Sep 22 02:33:28 2002 +0000 @@ -172,7 +172,7 @@ } if(pl_resample.up>pl_resample.dn) return upsample(); - if(pl_resample.up<pl_resample.dn) +// if(pl_resample.up<pl_resample.dn) return downsample(); }
--- a/libmpcodecs/ad_realaud.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpcodecs/ad_realaud.c Sun Sep 22 02:33:28 2002 +0000 @@ -32,15 +32,15 @@ void *__ctype_b=NULL; #endif -static unsigned long (*raCloseCodec)(unsigned long); -static unsigned long (*raDecode)(unsigned long,unsigned long,unsigned long,unsigned long,unsigned long,unsigned long); +static unsigned long (*raCloseCodec)(void*); +static unsigned long (*raDecode)(void*, char*,unsigned long,char*,unsigned long*,long); static unsigned long (*raFlush)(unsigned long,unsigned long,unsigned long); -static unsigned long (*raFreeDecoder)(unsigned long); -static unsigned long (*raGetFlavorProperty)(unsigned long,unsigned long,unsigned long,unsigned long); +static unsigned long (*raFreeDecoder)(void*); +static unsigned long (*raGetFlavorProperty)(void*,unsigned long,unsigned long,int*); //static unsigned long (*raGetNumberOfFlavors2)(void); -static unsigned long (*raInitDecoder)(unsigned long,unsigned long); -static unsigned long (*raOpenCodec2)(unsigned long); -static unsigned long (*raSetFlavor)(unsigned long,unsigned long); +static unsigned long (*raInitDecoder)(void*, void*); +static unsigned long (*raOpenCodec2)(void*); +static unsigned long (*raSetFlavor)(void*,unsigned long); //static void (*raSetDLLAccessPath)(unsigned long); static void (*raSetPwd)(char*,char*); @@ -59,7 +59,7 @@ // let's check if the driver is available, return 0 if not. // (you should do that if you use external lib(s) which is optional) unsigned int result; - int len; + int len=0; void* prop; char path[4096]; sprintf(path, REALCODEC_PATH "/%s", sh->codec->dll); @@ -97,8 +97,7 @@ sh->samplesize=sh->wf->wBitsPerSample/8; sh->channels=sh->wf->nChannels; - { unsigned char temp2[16]={1,0,0,3,4,0,0,0x14,0,0,0,0,0,1,0,3}; - // note: temp2[] come from audio stream extra header (last 16 of the total 24 bytes) + { ra_init_t init_data={ sh->wf->nSamplesPerSec,sh->wf->wBitsPerSample,sh->wf->nChannels, 100, // ???
--- a/libmpcodecs/dec_video.h Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpcodecs/dec_video.h Sun Sep 22 02:33:28 2002 +0000 @@ -13,6 +13,7 @@ extern int get_video_quality_max(sh_video_t *sh_video); extern void set_video_quality(sh_video_t *sh_video,int quality); +int get_video_colors(sh_video_t *sh_video,char *item,int *value); extern int set_video_colors(sh_video_t *sh_video,char *item,int value); extern int set_rectangle(sh_video_t *sh_video,int param,int value);
--- a/libmpcodecs/vd_ijpg.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpcodecs/vd_ijpg.c Sun Sep 22 02:33:28 2002 +0000 @@ -63,7 +63,6 @@ METHODDEF(boolean) fill_input_buffer (j_decompress_ptr cinfo) { my_src_ptr src = (my_src_ptr) cinfo->src; - size_t nbytes; src->pub.next_input_byte = src->inbuf; src->pub.bytes_in_buffer = src->bufsize; return TRUE;
--- a/libmpcodecs/vd_mpng.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpcodecs/vd_mpng.c Sun Sep 22 02:33:28 2002 +0000 @@ -66,7 +66,6 @@ // png_bytep data; png_bytep * row_p; png_uint_32 png_width=0,png_height=0; - char * palette = NULL; int depth,color; png_uint_32 i; mp_image_t* mpi;
--- a/libmpcodecs/vd_mtga.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpcodecs/vd_mtga.c Sun Sep 22 02:33:28 2002 +0000 @@ -62,7 +62,6 @@ /* to set/get/query special features/parameters */ static int control(sh_video_t *sh, int cmd, void *arg, ...) { - TGAInfo *info = (TGAInfo *) sh->context; switch (cmd) { case VDCTRL_QUERY_FORMAT:
--- a/libmpcodecs/vd_realvid.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpcodecs/vd_realvid.c Sun Sep 22 02:33:28 2002 +0000 @@ -22,11 +22,11 @@ LIBVD_EXTERN(realvid) -unsigned long (*rvyuv_custom_message)(unsigned long,unsigned long); -unsigned long (*rvyuv_free)(unsigned long); +unsigned long (*rvyuv_custom_message)(unsigned long*,void*); +unsigned long (*rvyuv_free)(void*); unsigned long (*rvyuv_hive_message)(unsigned long,unsigned long); -unsigned long (*rvyuv_init)(unsigned long,unsigned long); -unsigned long (*rvyuv_transform)(unsigned long,unsigned long,unsigned long,unsigned long,unsigned long); +unsigned long (*rvyuv_init)(void*, void*); // initdata,context +unsigned long (*rvyuv_transform)(char*, char*,unsigned long*,unsigned long*,void*); void *rv_handle=NULL; @@ -65,7 +65,6 @@ /* exits program when failure */ int load_syms_linux(char *path) { void *handle; - char *error; mp_msg(MSGT_DECVIDEO,MSGL_INFO, "opening shared obj '%s'\n", path); rv_handle = dlopen (path, RTLD_LAZY);
--- a/libmpcodecs/vf_cropdetect.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpcodecs/vf_cropdetect.c Sun Sep 22 02:33:28 2002 +0000 @@ -22,7 +22,6 @@ static int checkline(unsigned char* src,int stride,int len,int bpp){ int total=0; int div=len; - int x; switch(bpp){ case 1: while(--len>=0){
--- a/libmpdemux/asf_mmst_streaming.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/asf_mmst_streaming.c Sun Sep 22 02:33:28 2002 +0000 @@ -290,7 +290,7 @@ int interp_header (uint8_t *header, int header_len) { int i; - int packet_length; + int packet_length=-1; /* * parse header @@ -459,7 +459,7 @@ to_skip = a; } - +return 0; // is this ok? } int
--- a/libmpdemux/asf_streaming.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/asf_streaming.c Sun Sep 22 02:33:28 2002 +0000 @@ -312,7 +312,7 @@ asf_http_streaming_read( int fd, char *buffer, int size, streaming_ctrl_t *streaming_ctrl ) { static ASF_stream_chunck_t chunk; int read,chunk_size = 0; - static int rest = 0, drop_chunk = 0, waiting = 0,eof= 0; + static int rest = 0, drop_chunk = 0, waiting = 0; asf_http_streaming_ctrl_t *asf_http_ctrl = (asf_http_streaming_ctrl_t*)streaming_ctrl->data; while(1) { @@ -612,7 +612,6 @@ int asf_http_streaming_start( stream_t *stream ) { HTTP_header_t *http_hdr=NULL; - URL_t *url_next=NULL; URL_t *url = stream->streaming_ctrl->url; asf_http_streaming_ctrl_t *asf_http_ctrl; ASF_StreamType_e streaming_type;
--- a/libmpdemux/audio_in.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/audio_in.c Sun Sep 22 02:33:28 2002 +0000 @@ -1,5 +1,6 @@ #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include "config.h" @@ -41,7 +42,6 @@ int audio_in_setup(audio_in_t *ai) { - int err; switch (ai->type) { #ifdef HAVE_ALSA9 @@ -141,10 +141,9 @@ close(ai->oss.audio_fd); ai->setup = 0; return 0; - default: - return -1; } } + return -1; } int audio_in_start_capture(audio_in_t *ai)
--- a/libmpdemux/cache2.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/cache2.c Sun Sep 22 02:33:28 2002 +0000 @@ -50,13 +50,12 @@ } cache_vars_t; static int min_fill=0; -static int sleep_flag=0; int cache_fill_status=0; void cache_stats(cache_vars_t* s){ int newb=s->max_filepos-s->read_filepos; // new bytes in the buffer - printf("0x%06X [0x%06X] 0x%06X ",s->min_filepos,s->read_filepos,s->max_filepos); + printf("0x%06X [0x%06X] 0x%06X ",(int)s->min_filepos,(int)s->read_filepos,(int)s->max_filepos); printf("%3d %% (%3d%%)\n",100*newb/s->buffer_size,100*min_fill/s->buffer_size); } @@ -107,7 +106,7 @@ } int cache_fill(cache_vars_t* s){ - int back,back2,newb,space,len,pos,endpos; + int back,back2,newb,space,len,pos; off_t read=s->read_filepos; if(read<s->min_filepos || read>s->max_filepos){
--- a/libmpdemux/demux_asf.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/demux_asf.c Sun Sep 22 02:33:28 2002 +0000 @@ -181,6 +181,8 @@ case 3: plen=LOAD_LE32(p);p+=4;break; // dword case 2: plen=LOAD_LE16(p);p+=2;break; // word case 1: plen=p[0];p++;break; // byte + default: plen=0; + mp_msg(MSGT_DEMUX,MSGL_V,"Invalid plen type! assuming plen=0\n"); } // Read sequence: @@ -284,6 +286,7 @@ p+=rlen-4; } else { mp_msg(MSGT_DEMUX,MSGL_V,"unknown segment type (rlen): 0x%02X \n",rlen); + time2=0; // unknown p+=rlen; } }
--- a/libmpdemux/demux_avi.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/demux_avi.c Sun Sep 22 02:33:28 2002 +0000 @@ -633,8 +633,6 @@ if(sh_audio){ int i; -// int apos=0; - int last=0; int len=0; int skip_audio_bytes=0; int curr_audio_pos=-1;
--- a/libmpdemux/demux_mov.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/demux_mov.c Sun Sep 22 02:33:28 2002 +0000 @@ -524,7 +524,6 @@ int temp=stream_read_dword(demuxer->stream); int len=stream_read_dword(demuxer->stream); int i; - int x=0; unsigned int pts=0; mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sSample duration table! (%d blocks)\n",level,"",len); trak->durmap=malloc(sizeof(mov_durmap_t)*len); @@ -1416,7 +1415,6 @@ int frame=trak->pos; // editlist support: if(trak->type == MOV_TRAK_VIDEO && trak->editlist_size>=1){ - int t; // find the right editlist entry: if(frame<trak->editlist[trak->editlist_pos].start_frame) trak->editlist_pos=0;
--- a/libmpdemux/demux_nuv.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/demux_nuv.c Sun Sep 22 02:33:28 2002 +0000 @@ -197,9 +197,6 @@ sh_video_t *sh_video = NULL; sh_audio_t *sh_audio = NULL; struct rtfileheader rtjpeg_fileheader; - struct rtframeheader rtjpeg_frameheader; - unsigned long int tbls[128]; - int bytes_read; nuv_priv_t* priv = (nuv_priv_t*) malloc ( sizeof ( nuv_priv_t) ); demuxer->priv = priv; priv->current_audio_frame = 0;
--- a/libmpdemux/demux_pva.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/demux_pva.c Sun Sep 22 02:33:28 2002 +0000 @@ -18,7 +18,9 @@ */ - +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #include "config.h" #include "mp_msg.h" @@ -124,9 +126,6 @@ sh_video_t *sh_video = new_sh_video(demuxer,0); sh_audio_t * sh_audio = new_sh_audio(demuxer,0); pva_priv_t * priv; - unsigned char * buffer; - - stream_reset(demuxer->stream); stream_seek(demuxer->stream,0); @@ -172,6 +171,8 @@ return demuxer; } +int pva_get_payload(demuxer_t * d,pva_payload_t * payload); + // 0 = EOF or no stream found // 1 = successfully read a packet int demux_pva_fill_buffer (demuxer_t * demux) @@ -340,7 +341,7 @@ if((buffer[0] & 0xf0)!=0x20) { mp_msg(MSGT_DEMUX,MSGL_ERR,"demux_pva: expected audio PTS but badly formatted... (read 0x%02X)\n",buffer[0]); - return; + return 0; } payload->pts=0LL; payload->pts|=((uint64_t)(buffer[0] & 0x0e) << 29); @@ -358,6 +359,7 @@ break; } } + return 1; } int demux_seek_pva(demuxer_t * demuxer,float rel_seek_secs,int flags)
--- a/libmpdemux/demux_real.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/demux_real.c Sun Sep 22 02:33:28 2002 +0000 @@ -8,6 +8,9 @@ TODO: fix the whole syncing mechanism $Log$ + Revision 1.26 2002/09/22 02:33:26 arpi + tons of warning fixes, also some 10l bugfixes, including Dominik's PVA bug + Revision 1.25 2002/08/27 23:01:54 arpi - added matrix cracking/debugging code - disabled - use real codec headers for sipr @@ -578,10 +581,9 @@ // we need a more complicated demuxing // a block may contain multiple packets // as well as a packet may be contained in multiple blocks - int vpkg_header, vpkg_blknum, vpkg_length, vpkg_offset; - int vpkg_seqnum=-1, vpkg_oldseqnum=0, vpkg_seqnumread=0; + int vpkg_header, vpkg_length, vpkg_offset; + int vpkg_seqnum=-1; int vpkg_subseq=0; - int vpkg_ofs; while(len>2){ dp_hdr_t* dp_hdr; @@ -1169,7 +1171,7 @@ } // break; // default: -skip_this_chunk: +//skip_this_chunk: /* skip codec info */ tmp = stream_tell(demuxer->stream) - codec_pos; mp_msg(MSGT_DEMUX,MSGL_V,"### skipping %d bytes of codec info\n", codec_data_size - tmp); @@ -1235,7 +1237,6 @@ demux_stream_t *d_video = demuxer->video; sh_audio_t *sh_audio = d_audio->sh; sh_video_t *sh_video = d_video->sh; - int video_chunk_pos = d_video->pos; int vid = d_video->id, aid = d_audio->id; int next_offset = 0; int rel_seek_frames = 0;
--- a/libmpdemux/demux_viv.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/demux_viv.c Sun Sep 22 02:33:28 2002 +0000 @@ -222,10 +222,8 @@ } int vivo_check_file(demuxer_t* demuxer){ - int flags=0; int i=0; int len; - int len2; int c; unsigned char buf[2048+256]; vivo_priv_t* priv; @@ -310,8 +308,8 @@ #warning "Calculate PTS from picture header!" prefix = 1; c = stream_read_char(demux->stream); - printf("packet 0x82(pos=%lu) chunk=%x\n", - stream_tell(demux->stream), c); + printf("packet 0x82(pos=%u) chunk=%x\n", + (int)stream_tell(demux->stream), c); } switch(c&0xF0){ case 0x00: // header - skip it! @@ -618,7 +616,7 @@ /* disable seeking */ demuxer->seekable = 0; - printf("VIVO Video stream %d size: display: %dx%d, codec: %lux%lu\n", + printf("VIVO Video stream %d size: display: %dx%d, codec: %ux%u\n", demuxer->video->id, sh->disp_w, sh->disp_h, sh->bih->biWidth, sh->bih->biHeight); }
--- a/libmpdemux/open.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/open.c Sun Sep 22 02:33:28 2002 +0000 @@ -455,7 +455,8 @@ } int dvd_parse_chapter_range(struct config *conf, const char *range){ - char *s, *t; + const char *s; + char *t; conf; /* prevent warning from GCC */ s = range; dvd_chapter = 1;
--- a/libmpdemux/rtp.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/rtp.c Sun Sep 22 02:33:28 2002 +0000 @@ -116,7 +116,6 @@ static char buf[1600]; int headerSize; int lengthPacket; - int i; lengthPacket=recv(fd,buf,1590,0); // FIXME: error handling to write here
--- a/libmpdemux/tv.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/tv.c Sun Sep 22 02:33:28 2002 +0000 @@ -77,12 +77,7 @@ { tvi_handle_t *tvh=(tvi_handle_t*)(demux->priv); demux_packet_t* dp; - - sh_video_t *sh_video = demux->video->sh; - u_int len; - int aframeswaiting; - - len = 0; + u_int len=0; /* ================== ADD AUDIO PACKET =================== */ @@ -534,6 +529,7 @@ mp_msg(MSGT_TV, MSGL_V, "Current frequency: %lu (%.3f)\n", freq, (float)freq/16); } + return(1); } int tv_step_channel(tvi_handle_t *tvh, int direction) @@ -561,13 +557,16 @@ tv_set_freq(tvh, (unsigned long)(((float)cl.freq/1000)*16)); } } + return(1); } int tv_step_norm(tvi_handle_t *tvh) { + return(1); } int tv_step_chanlist(tvi_handle_t *tvh) { + return(1); } #endif /* USE_TV */
--- a/libmpdemux/tvi_v4l.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libmpdemux/tvi_v4l.c Sun Sep 22 02:33:28 2002 +0000 @@ -235,8 +235,6 @@ priv->audio_buffer_size, priv->audio_in.blocksize, priv->aud_skew_cnt); } -static int one = 1, zero = 0; - tvi_handle_t *tvi_init_v4l(char *device, char *adevice) { tvi_handle_t *h; @@ -499,7 +497,6 @@ /* audio init */ if (!tv_param_noaudio) { - int err; #ifdef HAVE_ALSA9 if (tv_param_alsa) @@ -1144,7 +1141,7 @@ { priv_t *priv = (priv_t*)data; struct timeval curtime; - double timestamp, skew, prev_skew, xskew, interval, prev_interval; + double skew, prev_skew, xskew, interval, prev_interval; int frame, nextframe; int fsize = priv->bytesperline * priv->height; int i; @@ -1256,6 +1253,7 @@ } } + return NULL; } static double grab_video_frame(priv_t *priv, char *buffer, int len) @@ -1287,9 +1285,8 @@ { priv_t *priv = (priv_t*)data; struct timeval tv; - int ret; int i, audio_skew_ptr = 0; - double tmp, current_time, current_skew, prev_skew = 0.0; + double tmp, current_time, prev_skew = 0.0; pthread_mutex_lock(&priv->audio_starter); @@ -1355,13 +1352,11 @@ priv->audio_cnt++; } } + return NULL; } static double grab_audio_frame(priv_t *priv, char *buffer, int len) { - int in_len = 0; - int max_tries = 2; - mp_dbg(MSGT_TV, MSGL_DBG2, "grab_audio_frame(priv=%p, buffer=%p, len=%d)\n", priv, buffer, len);
--- a/libvo/mga_common.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libvo/mga_common.c Sun Sep 22 02:33:28 2002 +0000 @@ -15,7 +15,6 @@ static int f = -1; static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){ - int x,y; uint32_t bespitch = (mga_vid_config.src_width + 31) & ~31; switch(mga_vid_config.format){ case MGA_VID_FORMAT_YV12: @@ -38,12 +37,8 @@ static void draw_slice_g200(uint8_t *image[], int stride[], int width,int height,int x,int y) { - uint8_t *src; - uint8_t *src2; uint8_t *dest; - uint32_t bespitch,h,w; - - bespitch = (mga_vid_config.src_width + 31) & ~31; + uint32_t bespitch = (mga_vid_config.src_width + 31) & ~31; dest = vid_data + bespitch*y + x; mem2agpcpy_pic(dest, image[0], width, height, bespitch, stride[0]); @@ -60,11 +55,9 @@ static void draw_slice_g400(uint8_t *image[], int stride[], int w,int h,int x,int y) { - uint8_t *src; uint8_t *dest; uint8_t *dest2; uint32_t bespitch,bespitch2; - int i; bespitch = (mga_vid_config.src_width + 31) & ~31; bespitch2 = bespitch/2; @@ -327,7 +320,6 @@ static int mga_init(){ - char *frame_mem; mga_vid_config.num_frames=(vo_directrendering && !vo_doublebuffering)?1:3; mga_vid_config.version=MGA_VID_VERSION; @@ -360,6 +352,7 @@ munmap(frames[0],mga_vid_config.frame_size*mga_vid_config.num_frames); close(f); f = -1; + return 0; } static uint32_t preinit(const char *arg)
--- a/libvo/spuenc.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libvo/spuenc.c Sun Sep 22 02:33:28 2002 +0000 @@ -210,9 +210,6 @@ pixbuf_encode_rle(int x, int y, int w, int h, char *inbuf, int stride,encodedata *ed){ pixbuf pb; int i, row; - int lx,ly; - int c; - unsigned char *pixbuffer; pb.x = w; pb.y = h;
--- a/libvo/vo_gif89a.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libvo/vo_gif89a.c Sun Sep 22 02:33:28 2002 +0000 @@ -15,6 +15,7 @@ #include "config.h" #include "video_out.h" #include "video_out_internal.h" +#include "sub.h" #include "../postproc/rgb2rgb.h"
--- a/libvo/vo_jpeg.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libvo/vo_jpeg.c Sun Sep 22 02:33:28 2002 +0000 @@ -17,6 +17,7 @@ #include "config.h" #include "video_out.h" #include "video_out_internal.h" +#include "sub.h" #include "../postproc/swscale.h" #include "../postproc/rgb2rgb.h"
--- a/libvo/vo_png.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libvo/vo_png.c Sun Sep 22 02:33:28 2002 +0000 @@ -21,6 +21,7 @@ #include "config.h" #include "video_out.h" #include "video_out_internal.h" +#include "sub.h" #include "../postproc/rgb2rgb.h"
--- a/libvo/vo_svga.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libvo/vo_svga.c Sun Sep 22 02:33:28 2002 +0000 @@ -8,6 +8,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <vga.h>
--- a/libvo/vo_xmga.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libvo/vo_xmga.c Sun Sep 22 02:33:28 2002 +0000 @@ -75,9 +75,7 @@ static XGCValues wGCV; -static XImage * myximage; - -static uint32_t mDepth, bpp, mode; +static uint32_t mDepth; static XWindowAttributes attribs; static uint32_t fgColor;
--- a/libvo/vo_xv.c Sun Sep 22 00:43:14 2002 +0000 +++ b/libvo/vo_xv.c Sun Sep 22 02:33:28 2002 +0000 @@ -65,14 +65,6 @@ "" }; -/* local data */ -static unsigned char *ImageData; - -/* X11 related variables */ -static XImage *myximage; -static int depth, bpp, mode; -static XWindowAttributes attribs; - #include <X11/extensions/Xv.h> #include <X11/extensions/Xvlib.h> // FIXME: dynamically allocate this stuff @@ -99,8 +91,6 @@ static int Shmem_Flag; #endif -static int gXErrorFlag; - static uint32_t image_width; static uint32_t image_height; static uint32_t image_format; @@ -219,7 +209,7 @@ then trigger it if it's ok so that the other values are at default upon query */ if (xv_atom != None) { - int val, port_value=0, port_min, port_max, port_mid; + int val, port_value=0, port_min, port_max; XvGetPortAttribute(mDisplay, xv_port, xv_atom, &port_value); @@ -279,11 +269,11 @@ // char *name = ":0.0"; XSizeHints hint; XVisualInfo vinfo; - XEvent xev; - XGCValues xgcv; XSetWindowAttributes xswa; + XWindowAttributes attribs; unsigned long xswamask; + int depth; #ifdef HAVE_XF86VM int vm=0; unsigned int modeline_width, modeline_height;
--- a/loader/dshow/DS_Filter.c Sun Sep 22 00:43:14 2002 +0000 +++ b/loader/dshow/DS_Filter.c Sun Sep 22 02:33:28 2002 +0000 @@ -85,7 +85,7 @@ AM_MEDIA_TYPE* out_fmt) { int init = 0; - char eb[250]; +// char eb[250]; const char* em = NULL; DS_Filter* This = (DS_Filter*) malloc(sizeof(DS_Filter)); if (!This) @@ -159,7 +159,7 @@ enum_pins->vt->Reset(enum_pins); result = enum_pins->vt->Next(enum_pins, (ULONG)256, (IPin**)array, &fetched); - Debug printf("Pins enumeration returned %ld pins, error is %x\n", fetched, (int)result); + Debug printf("Pins enumeration returned %d pins, error is %x\n", (int)fetched, (int)result); for (i = 0; i < fetched; i++) {
--- a/loader/dshow/DS_VideoDecoder.c Sun Sep 22 00:43:14 2002 +0000 +++ b/loader/dshow/DS_VideoDecoder.c Sun Sep 22 02:33:28 2002 +0000 @@ -7,6 +7,7 @@ #include "guids.h" #include "interfaces.h" +#include "registry.h" #ifndef NOAVIFILE_HEADERS #include "videodecoder.h" @@ -852,7 +853,7 @@ */ int DS_SetAttr_DivX(char* attribute, int value){ - int result, status, newkey, count; + int result, status, newkey; if(strcasecmp(attribute, "Quality")==0){ char* keyname="SOFTWARE\\Microsoft\\Scrunch"; result=RegCreateKeyExA(HKEY_CURRENT_USER, keyname, 0, 0, 0, 0, 0, &newkey, &status);
--- a/mencoder.c Sun Sep 22 00:43:14 2002 +0000 +++ b/mencoder.c Sun Sep 22 02:33:28 2002 +0000 @@ -66,6 +66,8 @@ #include "fastmemcpy.h" +#include "linux/timer.h" + int vo_doublebuffering=0; int vo_directrendering=0; int vo_config_count=0; @@ -110,8 +112,6 @@ double max_vout_time_usage=0; double cur_video_time_usage=0; double cur_vout_time_usage=0; -static double audio_time_usage=0; -static int total_time_usage_start=0; int benchmark=0; // A-V sync: @@ -191,7 +191,6 @@ #endif static int vo_w=0, vo_h=0; -static int input_pitch, input_bpp; //-------------------------- config stuff: @@ -1256,7 +1255,6 @@ static int parse_end_at(struct config *conf, const char* param) { - int i; end_at_type = END_AT_NONE;
--- a/mplayer.c Sun Sep 22 00:43:14 2002 +0000 +++ b/mplayer.c Sun Sep 22 02:33:28 2002 +0000 @@ -131,6 +131,7 @@ #include "libmpcodecs/dec_audio.h" #include "libmpcodecs/dec_video.h" +//#include "libmpcodecs/vf.h" //**************************************************************************// //**************************************************************************// @@ -491,7 +492,6 @@ //char* title="MPlayer"; // movie info: -int out_fmt=0; int eof=0; int osd_function=OSD_PLAY;
--- a/postproc/rgb2rgb.h Sun Sep 22 00:43:14 2002 +0000 +++ b/postproc/rgb2rgb.h Sun Sep 22 02:33:28 2002 +0000 @@ -42,9 +42,13 @@ extern void palette8torgb32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette); +extern void palette8tobgr32(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette); +extern void palette8torgb24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette); +extern void palette8tobgr24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette); extern void palette8torgb16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette); +extern void palette8tobgr16(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette); extern void palette8torgb15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette); -extern void palette8torgb24(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette); +extern void palette8tobgr15(const uint8_t *src, uint8_t *dst, unsigned num_pixels, const uint8_t *palette); extern void yv12toyuy2(const uint8_t *ysrc, const uint8_t *usrc, const uint8_t *vsrc, uint8_t *dst, unsigned int width, unsigned int height,
--- a/sub_cc.c Sun Sep 22 00:43:14 2002 +0000 +++ b/sub_cc.c Sun Sep 22 02:33:28 2002 +0000 @@ -135,7 +135,7 @@ } else if (c1 & 0x10) // control code / special char { - int channel= (c1 & 0x08) >> 3; +// int channel= (c1 & 0x08) >> 3; c1&=~0x08; if(data!=lastcode) {
--- a/subreader.c Sun Sep 22 00:43:14 2002 +0000 +++ b/subreader.c Sun Sep 22 02:33:28 2002 +0000 @@ -53,7 +53,7 @@ subtitle *sub_read_line_sami(FILE *fd, subtitle *current) { static char line[LINE_LEN+1]; static char *s = NULL, *slacktime_s; - char text[LINE_LEN+1], *p, *q; + char text[LINE_LEN+1], *p=NULL, *q; int state; current->lines = current->start = current->end = 0; @@ -566,7 +566,7 @@ next = line,i=0; - current->text[0]==""; // just to be sure that string is clear + current->text[0]=""; // just to be sure that string is clear while ((next =sub_readtext (next, &(current->text[i])))) { if (current->text[i]==ERR) {return ERR;} @@ -674,7 +674,7 @@ subtitle* subcp_recode (subtitle *sub) { int l=sub->lines; - size_t ileft, oleft, otlen; + size_t ileft, oleft; char *op, *ip, *ot; while (l){