1
mirror of https://github.com/mpv-player/mpv synced 2024-10-30 04:46:41 +01:00

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
This commit is contained in:
arpi 2002-09-22 02:33:28 +00:00
parent 61c5a99851
commit d483a015a2
44 changed files with 86 additions and 118 deletions

View File

@ -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;

View File

@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_DVB
#include <sys/ioctl.h>
#endif

View File

@ -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;

View File

@ -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;

View File

@ -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--;

View File

@ -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

View File

@ -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();
}

View File

@ -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, // ???

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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:

View File

@ -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);

View File

@ -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){

View File

@ -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

View File

@ -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;

View File

@ -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,11 +141,10 @@ int audio_in_uninit(audio_in_t *ai)
close(ai->oss.audio_fd);
ai->setup = 0;
return 0;
default:
}
}
return -1;
}
}
}
int audio_in_start_capture(audio_in_t *ai)
{

View File

@ -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){

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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);
}

View File

@ -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;

View File

@ -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

View File

@ -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 */

View File

@ -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);

View File

@ -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)

View File

@ -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;

View File

@ -15,6 +15,7 @@
#include "config.h"
#include "video_out.h"
#include "video_out_internal.h"
#include "sub.h"
#include "../postproc/rgb2rgb.h"

View File

@ -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"

View File

@ -21,6 +21,7 @@
#include "config.h"
#include "video_out.h"
#include "video_out_internal.h"
#include "sub.h"
#include "../postproc/rgb2rgb.h"

View File

@ -8,6 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vga.h>

View File

@ -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;

View File

@ -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 <X11/extensions/Xv.h>
#include <X11/extensions/Xvlib.h>
// 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;

View File

@ -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++)
{

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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 palette8torgb16(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 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 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,

View File

@ -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)
{

View File

@ -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){