From d483a015a2bbca2aec8a287c0ff6eeb0f176a8bb Mon Sep 17 00:00:00 2001 From: arpi Date: Sun, 22 Sep 2002 02:33:28 +0000 Subject: tons of warning fixes, also some 10l bugfixes, including Dominik's PVA bug git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7473 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cfgparser.c | 2 +- libao2/ao_mpegpes.c | 1 + libao2/ao_null.c | 2 +- libao2/ao_oss.c | 2 +- libao2/ao_plugin.c | 6 +++--- libao2/pl_delay.c | 1 - libao2/pl_resample.c | 2 +- libmpcodecs/ad_realaud.c | 19 +++++++++---------- libmpcodecs/dec_video.h | 1 + libmpcodecs/vd_ijpg.c | 1 - libmpcodecs/vd_mpng.c | 1 - libmpcodecs/vd_mtga.c | 1 - libmpcodecs/vd_realvid.c | 9 ++++----- libmpcodecs/vf_cropdetect.c | 1 - libmpdemux/asf_mmst_streaming.c | 4 ++-- libmpdemux/asf_streaming.c | 3 +-- libmpdemux/audio_in.c | 5 ++--- libmpdemux/cache2.c | 5 ++--- libmpdemux/demux_asf.c | 3 +++ libmpdemux/demux_avi.c | 2 -- libmpdemux/demux_mov.c | 2 -- libmpdemux/demux_nuv.c | 3 --- libmpdemux/demux_pva.c | 12 +++++++----- libmpdemux/demux_real.c | 11 ++++++----- libmpdemux/demux_viv.c | 8 +++----- libmpdemux/open.c | 3 ++- libmpdemux/rtp.c | 1 - libmpdemux/tv.c | 11 +++++------ libmpdemux/tvi_v4l.c | 13 ++++--------- libvo/mga_common.c | 11 ++--------- libvo/spuenc.c | 3 --- libvo/vo_gif89a.c | 1 + libvo/vo_jpeg.c | 1 + libvo/vo_png.c | 1 + libvo/vo_svga.c | 1 + libvo/vo_xmga.c | 4 +--- libvo/vo_xv.c | 16 +++------------- loader/dshow/DS_Filter.c | 4 ++-- loader/dshow/DS_VideoDecoder.c | 3 ++- mencoder.c | 6 ++---- mplayer.c | 2 +- postproc/rgb2rgb.h | 6 +++++- sub_cc.c | 2 +- subreader.c | 6 +++--- 44 files changed, 85 insertions(+), 117 deletions(-) diff --git a/cfgparser.c b/cfgparser.c index b0799e0562..30837e209a 100644 --- a/cfgparser.c +++ b/cfgparser.c @@ -744,7 +744,7 @@ static int config_read_option(m_config_t *config,config_t** conf_list, char *opt 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; diff --git a/libao2/ao_mpegpes.c b/libao2/ao_mpegpes.c index 3bd8cd9659..38d3b5deaa 100644 --- a/libao2/ao_mpegpes.c +++ b/libao2/ao_mpegpes.c @@ -1,5 +1,6 @@ #include #include +#include #ifdef HAVE_DVB #include #endif diff --git a/libao2/ao_null.c b/libao2/ao_null.c index b5a5411a63..3add323ad8 100644 --- a/libao2/ao_null.c +++ b/libao2/ao_null.c @@ -19,7 +19,7 @@ LIBAO_EXTERN(null) struct timeval last_tv; int buffer; -static int drain(){ +static void drain(){ struct timeval now_tv; int temp, temp2; diff --git a/libao2/ao_oss.c b/libao2/ao_oss.c index 4af83e865c..29c913faca 100644 --- a/libao2/ao_oss.c +++ b/libao2/ao_oss.c @@ -55,7 +55,7 @@ static int control(int cmd,int arg){ 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; diff --git a/libao2/ao_plugin.c b/libao2/ao_plugin.c index ad1934c8ff..449e127308 100644 --- a/libao2/ao_plugin.c +++ b/libao2/ao_plugin.c @@ -148,15 +148,15 @@ static int init(int rate,int channels,int format,int flags){ ao_plugin_data.delay_mult=1; ao_plugin_data.delay_fix=0; - for(i=0;iinit(); if(!use_plugin[i]) plugin(i)->uninit(); } npl=i; - for(i=0;ipl_resample.dn) return upsample(); - if(pl_resample.upcodec->dll); @@ -97,8 +97,7 @@ static int preinit(sh_audio_t *sh){ 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, // ??? diff --git a/libmpcodecs/dec_video.h b/libmpcodecs/dec_video.h index 53c728dd1d..cb3a088d63 100644 --- a/libmpcodecs/dec_video.h +++ b/libmpcodecs/dec_video.h @@ -13,6 +13,7 @@ extern int decode_video(sh_video_t *sh_video,unsigned char *start,int in_size,in 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); diff --git a/libmpcodecs/vd_ijpg.c b/libmpcodecs/vd_ijpg.c index a7ab9d0368..e4c127a0da 100644 --- a/libmpcodecs/vd_ijpg.c +++ b/libmpcodecs/vd_ijpg.c @@ -63,7 +63,6 @@ METHODDEF(void) init_source (j_decompress_ptr cinfo) 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; diff --git a/libmpcodecs/vd_mpng.c b/libmpcodecs/vd_mpng.c index 99fa7fc5ad..da6a8bca68 100644 --- a/libmpcodecs/vd_mpng.c +++ b/libmpcodecs/vd_mpng.c @@ -66,7 +66,6 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ // 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; diff --git a/libmpcodecs/vd_mtga.c b/libmpcodecs/vd_mtga.c index f94131ccb9..2ea3783475 100644 --- a/libmpcodecs/vd_mtga.c +++ b/libmpcodecs/vd_mtga.c @@ -62,7 +62,6 @@ static int last_c = -1; /* 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: diff --git a/libmpcodecs/vd_realvid.c b/libmpcodecs/vd_realvid.c index c3c91da61e..89b526f6e2 100644 --- a/libmpcodecs/vd_realvid.c +++ b/libmpcodecs/vd_realvid.c @@ -22,11 +22,11 @@ static vd_info_t info = { 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 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){ /* 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); diff --git a/libmpcodecs/vf_cropdetect.c b/libmpcodecs/vf_cropdetect.c index f8b63cf5ba..c8d4aae560 100644 --- a/libmpcodecs/vf_cropdetect.c +++ b/libmpcodecs/vf_cropdetect.c @@ -22,7 +22,6 @@ struct vf_priv_s { 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){ diff --git a/libmpdemux/asf_mmst_streaming.c b/libmpdemux/asf_mmst_streaming.c index 05468a740b..2011b3138b 100644 --- a/libmpdemux/asf_mmst_streaming.c +++ b/libmpdemux/asf_mmst_streaming.c @@ -290,7 +290,7 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl) int interp_header (uint8_t *header, int header_len) { int i; - int packet_length; + int packet_length=-1; /* * parse header @@ -459,7 +459,7 @@ while(CheckOuterData) to_skip = a; } - +return 0; // is this ok? } int diff --git a/libmpdemux/asf_streaming.c b/libmpdemux/asf_streaming.c index 23f1feb66b..22a50fcf58 100644 --- a/libmpdemux/asf_streaming.c +++ b/libmpdemux/asf_streaming.c @@ -312,7 +312,7 @@ int 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 @@ asf_http_parse_response( HTTP_header_t *http_hdr ) { 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; diff --git a/libmpdemux/audio_in.c b/libmpdemux/audio_in.c index 5fdfa9f6f8..635239aee0 100644 --- a/libmpdemux/audio_in.c +++ b/libmpdemux/audio_in.c @@ -1,5 +1,6 @@ #include #include +#include #include "config.h" @@ -41,7 +42,6 @@ int audio_in_init(audio_in_t *ai, int type) int audio_in_setup(audio_in_t *ai) { - int err; switch (ai->type) { #ifdef HAVE_ALSA9 @@ -141,10 +141,9 @@ int audio_in_uninit(audio_in_t *ai) close(ai->oss.audio_fd); ai->setup = 0; return 0; - default: - return -1; } } + return -1; } int audio_in_start_capture(audio_in_t *ai) diff --git a/libmpdemux/cache2.c b/libmpdemux/cache2.c index d787b007fe..7d42281a13 100644 --- a/libmpdemux/cache2.c +++ b/libmpdemux/cache2.c @@ -50,13 +50,12 @@ typedef struct { } 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_read(cache_vars_t* s,unsigned char* buf,int size){ } 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(readmin_filepos || read>s->max_filepos){ diff --git a/libmpdemux/demux_asf.c b/libmpdemux/demux_asf.c index 605b625fcb..c2b61a8731 100644 --- a/libmpdemux/demux_asf.c +++ b/libmpdemux/demux_asf.c @@ -181,6 +181,8 @@ int demux_asf_fill_buffer(demuxer_t *demux){ 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 @@ int demux_asf_fill_buffer(demuxer_t *demux){ p+=rlen-4; } else { mp_msg(MSGT_DEMUX,MSGL_V,"unknown segment type (rlen): 0x%02X \n",rlen); + time2=0; // unknown p+=rlen; } } diff --git a/libmpdemux/demux_avi.c b/libmpdemux/demux_avi.c index 09cbdae882..b034988191 100644 --- a/libmpdemux/demux_avi.c +++ b/libmpdemux/demux_avi.c @@ -633,8 +633,6 @@ void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,int flags){ if(sh_audio){ int i; -// int apos=0; - int last=0; int len=0; int skip_audio_bytes=0; int curr_audio_pos=-1; diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c index ca63a04caf..406e764481 100644 --- a/libmpdemux/demux_mov.c +++ b/libmpdemux/demux_mov.c @@ -524,7 +524,6 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak 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 @@ if(trak->samplesize){ int frame=trak->pos; // editlist support: if(trak->type == MOV_TRAK_VIDEO && trak->editlist_size>=1){ - int t; // find the right editlist entry: if(frameeditlist[trak->editlist_pos].start_frame) trak->editlist_pos=0; diff --git a/libmpdemux/demux_nuv.c b/libmpdemux/demux_nuv.c index 47efef437e..b488d462d6 100644 --- a/libmpdemux/demux_nuv.c +++ b/libmpdemux/demux_nuv.c @@ -197,9 +197,6 @@ demuxer_t* demux_open_nuv ( demuxer_t* demuxer ) 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; diff --git a/libmpdemux/demux_pva.c b/libmpdemux/demux_pva.c index e07aac5b59..93865d24bc 100644 --- a/libmpdemux/demux_pva.c +++ b/libmpdemux/demux_pva.c @@ -18,7 +18,9 @@ */ - +#include +#include +#include #include "config.h" #include "mp_msg.h" @@ -124,9 +126,6 @@ demuxer_t * demux_open_pva (demuxer_t * demuxer) 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 @@ demuxer_t * demux_open_pva (demuxer_t * demuxer) 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 @@ int pva_get_payload(demuxer_t * d,pva_payload_t * payload) 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 @@ int pva_get_payload(demuxer_t * d,pva_payload_t * payload) break; } } + return 1; } int demux_seek_pva(demuxer_t * demuxer,float rel_seek_secs,int flags) diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c index cb7864b492..519187ee4f 100644 --- a/libmpdemux/demux_real.c +++ b/libmpdemux/demux_real.c @@ -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 @@ loop: // 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 @@ void demux_open_real(demuxer_t* demuxer) } // 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 @@ int demux_seek_real(demuxer_t *demuxer, float rel_seek_secs, int flags) 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; diff --git a/libmpdemux/demux_viv.c b/libmpdemux/demux_viv.c index 353b0ec12d..9ca575a6c0 100644 --- a/libmpdemux/demux_viv.c +++ b/libmpdemux/demux_viv.c @@ -222,10 +222,8 @@ static void vivo_parse_text_header(demuxer_t *demux, int header_len) } 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 @@ int demux_vivo_fill_buffer(demuxer_t *demux){ #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 @@ void demux_open_vivo(demuxer_t* demuxer){ /* 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); } diff --git a/libmpdemux/open.c b/libmpdemux/open.c index 98491a1e07..1caf6662d8 100644 --- a/libmpdemux/open.c +++ b/libmpdemux/open.c @@ -455,7 +455,8 @@ if(dvd_title){ } 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; diff --git a/libmpdemux/rtp.c b/libmpdemux/rtp.c index bd15918431..780c982dd4 100644 --- a/libmpdemux/rtp.c +++ b/libmpdemux/rtp.c @@ -116,7 +116,6 @@ int getrtp(int fd, struct rtpheader *rh, char** data, int* lengthData) { static char buf[1600]; int headerSize; int lengthPacket; - int i; lengthPacket=recv(fd,buf,1590,0); // FIXME: error handling to write here diff --git a/libmpdemux/tv.c b/libmpdemux/tv.c index a437eada9b..3e9dd83dbd 100644 --- a/libmpdemux/tv.c +++ b/libmpdemux/tv.c @@ -77,12 +77,7 @@ int demux_tv_fill_buffer(demuxer_t *demux, demux_stream_t *ds) { 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 @@ int tv_set_freq(tvi_handle_t *tvh, unsigned long freq) 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 @@ int tv_step_channel(tvi_handle_t *tvh, int direction) 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 */ diff --git a/libmpdemux/tvi_v4l.c b/libmpdemux/tvi_v4l.c index 1461cee846..e8deab84d1 100644 --- a/libmpdemux/tvi_v4l.c +++ b/libmpdemux/tvi_v4l.c @@ -235,8 +235,6 @@ static void setup_audio_buffer_sizes(priv_t *priv) 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 @@ static int init(priv_t *priv) /* audio init */ if (!tv_param_noaudio) { - int err; #ifdef HAVE_ALSA9 if (tv_param_alsa) @@ -1144,7 +1141,7 @@ static void *video_grabber(void *data) { 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 @@ static void *video_grabber(void *data) } } + return NULL; } static double grab_video_frame(priv_t *priv, char *buffer, int len) @@ -1287,9 +1285,8 @@ static void *audio_grabber(void *data) { 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 @@ static void *audio_grabber(void *data) 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); diff --git a/libvo/mga_common.c b/libvo/mga_common.c index ac46916021..67f129f5f3 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -15,7 +15,6 @@ static uint8_t *vid_data, *frames[4]; 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_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned 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 @@ draw_slice_g200(uint8_t *image[], int stride[], int width,int height,int x,int y 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 uint32_t control(uint32_t request, void *data, ...) 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 @@ static int mga_uninit(){ 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) diff --git a/libvo/spuenc.c b/libvo/spuenc.c index e2cb9438ea..561774111a 100644 --- a/libvo/spuenc.c +++ b/libvo/spuenc.c @@ -210,9 +210,6 @@ void 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; diff --git a/libvo/vo_gif89a.c b/libvo/vo_gif89a.c index c31498bc7e..af94210135 100644 --- a/libvo/vo_gif89a.c +++ b/libvo/vo_gif89a.c @@ -15,6 +15,7 @@ #include "config.h" #include "video_out.h" #include "video_out_internal.h" +#include "sub.h" #include "../postproc/rgb2rgb.h" diff --git a/libvo/vo_jpeg.c b/libvo/vo_jpeg.c index 277915402c..51af4f91f4 100644 --- a/libvo/vo_jpeg.c +++ b/libvo/vo_jpeg.c @@ -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" diff --git a/libvo/vo_png.c b/libvo/vo_png.c index 16c364019c..e616c4c9c2 100644 --- a/libvo/vo_png.c +++ b/libvo/vo_png.c @@ -21,6 +21,7 @@ #include "config.h" #include "video_out.h" #include "video_out_internal.h" +#include "sub.h" #include "../postproc/rgb2rgb.h" diff --git a/libvo/vo_svga.c b/libvo/vo_svga.c index 0c15abf02d..bb6e87a231 100644 --- a/libvo/vo_svga.c +++ b/libvo/vo_svga.c @@ -8,6 +8,7 @@ #include #include +#include #include diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index dc1d105fba..e25617229d 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -75,9 +75,7 @@ static vo_info_t vo_info = static XGCValues wGCV; -static XImage * myximage; - -static uint32_t mDepth, bpp, mode; +static uint32_t mDepth; static XWindowAttributes attribs; static uint32_t fgColor; diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 221a70345d..f9c2939b5f 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -65,14 +65,6 @@ static vo_info_t vo_info = "" }; -/* local data */ -static unsigned char *ImageData; - -/* X11 related variables */ -static XImage *myximage; -static int depth, bpp, mode; -static XWindowAttributes attribs; - #include #include // FIXME: dynamically allocate this stuff @@ -99,8 +91,6 @@ static XShmSegmentInfo Shminfo[NUM_BUFFERS]; 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 @@ static int xv_get_eq(char *name, int *value) 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 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32 // 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; diff --git a/loader/dshow/DS_Filter.c b/loader/dshow/DS_Filter.c index fb910ee99e..50f0cec843 100644 --- a/loader/dshow/DS_Filter.c +++ b/loader/dshow/DS_Filter.c @@ -85,7 +85,7 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id, 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 @@ DS_Filter* DS_FilterCreate(const char* dllname, const GUID* id, 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++) { diff --git a/loader/dshow/DS_VideoDecoder.c b/loader/dshow/DS_VideoDecoder.c index 55b2a2e184..bc0b7b27ba 100644 --- a/loader/dshow/DS_VideoDecoder.c +++ b/loader/dshow/DS_VideoDecoder.c @@ -7,6 +7,7 @@ #include "guids.h" #include "interfaces.h" +#include "registry.h" #ifndef NOAVIFILE_HEADERS #include "videodecoder.h" @@ -852,7 +853,7 @@ vim: vi* sux. */ 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); diff --git a/mencoder.c b/mencoder.c index 0363bc4e8a..9973ab3c42 100644 --- a/mencoder.c +++ b/mencoder.c @@ -66,6 +66,8 @@ static char* banner_text= #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_video_time_usage=0; 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 @@ float lame_param_scale=-1; // unset #endif static int vo_w=0, vo_h=0; -static int input_pitch, input_bpp; //-------------------------- config stuff: @@ -1256,7 +1255,6 @@ return interrupted; static int parse_end_at(struct config *conf, const char* param) { - int i; end_at_type = END_AT_NONE; diff --git a/mplayer.c b/mplayer.c index e8569cf031..8c05b98cba 100644 --- a/mplayer.c +++ b/mplayer.c @@ -131,6 +131,7 @@ static int max_framesize=0; #include "libmpcodecs/dec_audio.h" #include "libmpcodecs/dec_video.h" +//#include "libmpcodecs/vf.h" //**************************************************************************// //**************************************************************************// @@ -491,7 +492,6 @@ int delay_corrected=1; //char* title="MPlayer"; // movie info: -int out_fmt=0; int eof=0; int osd_function=OSD_PLAY; diff --git a/postproc/rgb2rgb.h b/postproc/rgb2rgb.h index 1e1064d3f3..a36f267f1f 100644 --- a/postproc/rgb2rgb.h +++ b/postproc/rgb2rgb.h @@ -42,9 +42,13 @@ extern void rgb8tobgr8(const uint8_t *src, uint8_t *dst, unsigned src_size); 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, diff --git a/sub_cc.c b/sub_cc.c index 311f504982..bcea20f0ae 100644 --- a/sub_cc.c +++ b/sub_cc.c @@ -135,7 +135,7 @@ static void cc_decode_EIA608(unsigned short int data) } else if (c1 & 0x10) // control code / special char { - int channel= (c1 & 0x08) >> 3; +// int channel= (c1 & 0x08) >> 3; c1&=~0x08; if(data!=lastcode) { diff --git a/subreader.c b/subreader.c index fa10c71393..5f0380e77c 100644 --- a/subreader.c +++ b/subreader.c @@ -53,7 +53,7 @@ static void trail_space(char *s) { 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 @@ subtitle *sub_read_line_subrip09(FILE *fd,subtitle *current) { 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 @@ static char icbuffer[ICBUFFSIZE]; subtitle* subcp_recode (subtitle *sub) { int l=sub->lines; - size_t ileft, oleft, otlen; + size_t ileft, oleft; char *op, *ip, *ot; while (l){ -- cgit v1.2.3