summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cfgparser.c2
-rw-r--r--libao2/ao_mpegpes.c1
-rw-r--r--libao2/ao_null.c2
-rw-r--r--libao2/ao_oss.c2
-rw-r--r--libao2/ao_plugin.c6
-rw-r--r--libao2/pl_delay.c1
-rw-r--r--libao2/pl_resample.c2
-rw-r--r--libmpcodecs/ad_realaud.c19
-rw-r--r--libmpcodecs/dec_video.h1
-rw-r--r--libmpcodecs/vd_ijpg.c1
-rw-r--r--libmpcodecs/vd_mpng.c1
-rw-r--r--libmpcodecs/vd_mtga.c1
-rw-r--r--libmpcodecs/vd_realvid.c9
-rw-r--r--libmpcodecs/vf_cropdetect.c1
-rw-r--r--libmpdemux/asf_mmst_streaming.c4
-rw-r--r--libmpdemux/asf_streaming.c3
-rw-r--r--libmpdemux/audio_in.c5
-rw-r--r--libmpdemux/cache2.c5
-rw-r--r--libmpdemux/demux_asf.c3
-rw-r--r--libmpdemux/demux_avi.c2
-rw-r--r--libmpdemux/demux_mov.c2
-rw-r--r--libmpdemux/demux_nuv.c3
-rw-r--r--libmpdemux/demux_pva.c12
-rw-r--r--libmpdemux/demux_real.c11
-rw-r--r--libmpdemux/demux_viv.c8
-rw-r--r--libmpdemux/open.c3
-rw-r--r--libmpdemux/rtp.c1
-rw-r--r--libmpdemux/tv.c11
-rw-r--r--libmpdemux/tvi_v4l.c13
-rw-r--r--libvo/mga_common.c11
-rw-r--r--libvo/spuenc.c3
-rw-r--r--libvo/vo_gif89a.c1
-rw-r--r--libvo/vo_jpeg.c1
-rw-r--r--libvo/vo_png.c1
-rw-r--r--libvo/vo_svga.c1
-rw-r--r--libvo/vo_xmga.c4
-rw-r--r--libvo/vo_xv.c16
-rw-r--r--loader/dshow/DS_Filter.c4
-rw-r--r--loader/dshow/DS_VideoDecoder.c3
-rw-r--r--mencoder.c6
-rw-r--r--mplayer.c2
-rw-r--r--postproc/rgb2rgb.h6
-rw-r--r--sub_cc.c2
-rw-r--r--subreader.c6
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 <stdio.h>
#include <stdlib.h>
+#include <string.h>
#ifdef HAVE_DVB
#include <sys/ioctl.h>
#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;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--;
diff --git a/libao2/pl_delay.c b/libao2/pl_delay.c
index 32bec035eb..d194a5a3e1 100644
--- a/libao2/pl_delay.c
+++ b/libao2/pl_delay.c
@@ -55,7 +55,6 @@ static int control(int cmd,int arg){
// 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
diff --git a/libao2/pl_resample.c b/libao2/pl_resample.c
index 81012770ed..8cecb7bce8 100644
--- a/libao2/pl_resample.c
+++ b/libao2/pl_resample.c
@@ -172,7 +172,7 @@ static int play(){
}
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();
}
diff --git a/libmpcodecs/ad_realaud.c b/libmpcodecs/ad_realaud.c
index fd0511c99d..ae94bf097f 100644
--- a/libmpcodecs/ad_realaud.c
+++ b/libmpcodecs/ad_realaud.c
@@ -32,15 +32,15 @@ void *__builtin_new(unsigned long size) {
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 @@ static int preinit(sh_audio_t *sh){
// 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 @@ 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 <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#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(read<s->min_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(frame<trak->editlist[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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#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_