# HG changeset patch # User arpi # Date 1030574748 0 # Node ID 1e47c2e7aa8e896956271852cb23c40904d209ad # Parent d3fd5d5685944233283beced0efe78133abed8a1 mostly compiler warning fixes, some small bugfix patch by Dominik Mierzejewski diff -r d3fd5d568594 -r 1e47c2e7aa8e dll_init.c --- a/dll_init.c Wed Aug 28 22:02:38 2002 +0000 +++ b/dll_init.c Wed Aug 28 22:45:48 2002 +0000 @@ -538,7 +538,7 @@ ret = ICCompressGetFormat(encoder_hic, input_bih, output_bih); if(ret < 0){ - unsigned char* temp=output_bih; + unsigned char* temp=(unsigned char*)output_bih; mp_msg(MSGT_WIN32,MSGL_ERR,"ICCompressGetFormat failed: Error %d (0x%X)\n", (int)ret, (int)ret); for (i=0; i < temp_len; i++) mp_msg(MSGT_WIN32, MSGL_DBG2, "%02x ", temp[i]); return 0; @@ -547,7 +547,7 @@ if (temp_len > sizeof(BITMAPINFOHEADER)) { - unsigned char* temp=output_bih; + unsigned char* temp=(unsigned char*)output_bih; mp_msg(MSGT_WIN32, MSGL_V, "Extra info in o_bih (%d bytes)!\n", temp_len-sizeof(BITMAPINFOHEADER)); for(i=sizeof(output_bih);icomptype == 'R') { - RTjpeg_init_decompress ( encoded+12, width, height ); + RTjpeg_init_decompress ( (unsigned long *)(encoded+12), width, height ); mp_msg(MSGT_DECVIDEO, MSGL_V, "Found RTjpeg tables (size: %d, width: %d, height: %d)\n", encoded_size-12, width, height); } diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Wed Aug 28 22:45:48 2002 +0000 @@ -258,7 +258,7 @@ } }else #endif - mpcodecs_draw_slice (sh,src, stride, width, height, 0, y); + mpcodecs_draw_slice (sh,(unsigned char*)src, stride, width, height, 0, y); } static int init_vo(sh_video_t *sh){ diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/vd_real.c --- a/libmpcodecs/vd_real.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/vd_real.c Wed Aug 28 22:45:48 2002 +0000 @@ -93,6 +93,11 @@ } #ifdef USE_WIN32DLL + +#include "../loader/ldt_keeper.h" +void* LoadLibraryA(char* name); +void* GetProcAddress(void* handle,char* func); + int load_syms_windows(char *path) { void *handle; Setup_LDT_Keeper(); diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/vd_svq1.c --- a/libmpcodecs/vd_svq1.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/vd_svq1.c Wed Aug 28 22:45:48 2002 +0000 @@ -17,6 +17,14 @@ LIBVD_EXTERN(svq1) +#ifdef USE_LIBAVCODEC +#ifdef USE_LIBAVCODEC_SO +#include +#else +#include "libavcodec/avcodec.h" +#endif +#endif + #include "native/svq1.h" // to set/get/query special features/parameters diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/ve_divx4.c --- a/libmpcodecs/ve_divx4.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/ve_divx4.c Wed Aug 28 22:45:48 2002 +0000 @@ -24,6 +24,7 @@ extern int pass; extern char* passtmpfile; +extern void mencoder_write_chunk(aviwrite_stream_t *s,int len,unsigned int flags); #include @@ -195,7 +196,7 @@ vf->put_image=put_image; vf->priv=malloc(sizeof(struct vf_priv_s)); memset(vf->priv,0,sizeof(struct vf_priv_s)); - vf->priv->mux=args; + vf->priv->mux=(aviwrite_stream_t*)args; mux_v->bih=malloc(sizeof(BITMAPINFOHEADER)); mux_v->bih->biSize=sizeof(BITMAPINFOHEADER); diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/ve_lavc.c --- a/libmpcodecs/ve_lavc.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/ve_lavc.c Wed Aug 28 22:45:48 2002 +0000 @@ -26,6 +26,7 @@ extern char* passtmpfile; extern int pass; +extern void mencoder_write_chunk(aviwrite_stream_t *s,int len,unsigned int flags); //===========================================================================// @@ -445,7 +446,7 @@ vf->put_image=put_image; vf->priv=malloc(sizeof(struct vf_priv_s)); memset(vf->priv,0,sizeof(struct vf_priv_s)); - vf->priv->mux=args; + vf->priv->mux=(aviwrite_stream_t*)args; /* XXX: hack: some of the MJPEG decoder DLL's needs exported huffman table, so we define a zero-table, also lavc mjpeg encoder is putting diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/ve_libdv.c --- a/libmpcodecs/ve_libdv.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/ve_libdv.c Wed Aug 28 22:45:48 2002 +0000 @@ -23,6 +23,8 @@ #include +extern void mencoder_write_chunk(aviwrite_stream_t *s,int len,unsigned int flags); + #ifndef DV_WIDTH #define DV_WIDTH 720 #define DV_PAL_HEIGHT 576 diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/ve_rawrgb.c --- a/libmpcodecs/ve_rawrgb.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/ve_rawrgb.c Wed Aug 28 22:45:48 2002 +0000 @@ -16,6 +16,8 @@ #include "mp_image.h" #include "vf.h" +extern void mencoder_write_chunk(aviwrite_stream_t *s,int len,unsigned int flags); + //===========================================================================// struct vf_priv_s { @@ -58,7 +60,7 @@ vf->put_image=put_image; vf->priv=malloc(sizeof(struct vf_priv_s)); memset(vf->priv,0,sizeof(struct vf_priv_s)); - vf->priv->mux=args; + vf->priv->mux=(aviwrite_stream_t*)args; mux_v->bih=malloc(sizeof(BITMAPINFOHEADER)); mux_v->bih->biSize=sizeof(BITMAPINFOHEADER); diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/ve_vfw.c --- a/libmpcodecs/ve_vfw.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/ve_vfw.c Wed Aug 28 22:45:48 2002 +0000 @@ -18,6 +18,8 @@ #include "mp_image.h" #include "vf.h" +extern void mencoder_write_chunk(aviwrite_stream_t *s,int len,unsigned int flags); + //===========================================================================// #include "dll_init.h" @@ -83,7 +85,7 @@ vf->put_image=put_image; vf->priv=malloc(sizeof(struct vf_priv_s)); memset(vf->priv,0,sizeof(struct vf_priv_s)); - vf->priv->mux=args; + vf->priv->mux=(aviwrite_stream_t*)args; vfw_bih=malloc(sizeof(BITMAPINFOHEADER)); vfw_bih->biSize=sizeof(BITMAPINFOHEADER); diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/vf.c --- a/libmpcodecs/vf.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/vf.c Wed Aug 28 22:45:48 2002 +0000 @@ -2,11 +2,11 @@ #include #include +#include "../config.h" #ifdef HAVE_MALLOC_H #include #endif -#include "../config.h" #include "../mp_msg.h" #include "../help_mp.h" diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/vf_lavc.c --- a/libmpcodecs/vf_lavc.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/vf_lavc.c Wed Aug 28 22:45:48 2002 +0000 @@ -104,7 +104,7 @@ vf->priv->pes.id=0x1E0; vf->priv->pes.timestamp=-1; // dunno - dmpi->planes[0]=&vf->priv->pes; + dmpi->planes[0]=(unsigned char*)&vf->priv->pes; vf_next_put_image(vf,dmpi); } diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/vf_palette.c --- a/libmpcodecs/vf_palette.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/vf_palette.c Wed Aug 28 22:45:48 2002 +0000 @@ -81,7 +81,7 @@ MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, mpi->w, mpi->h); - if(!mpi->planes[1]) mpi->planes[1]=gray_pal; + if(!mpi->planes[1]) mpi->planes[1]=(unsigned char*)gray_pal; if(mpi->w==mpi->stride[0] && dmpi->w*(dmpi->bpp>>3)==dmpi->stride[0]){ // no stride conversion needed diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/vf_pp.c --- a/libmpcodecs/vf_pp.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/vf_pp.c Wed Aug 28 22:45:48 2002 +0000 @@ -98,7 +98,7 @@ IMGFMT_YV12, IMGFMT_I420, IMGFMT_IYUV, - NULL + 0 }; static int open(vf_instance_t *vf, char* args){ diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpcodecs/vf_rectangle.c --- a/libmpcodecs/vf_rectangle.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpcodecs/vf_rectangle.c Wed Aug 28 22:45:48 2002 +0000 @@ -4,6 +4,8 @@ #include "mp_image.h" #include "vf.h" +#include "../libvo/fastmemcpy.h" + struct vf_priv_s { int x, y, w, h; }; diff -r d3fd5d568594 -r 1e47c2e7aa8e libmpdemux/aviprint.c --- a/libmpdemux/aviprint.c Wed Aug 28 22:02:38 2002 +0000 +++ b/libmpdemux/aviprint.c Wed Aug 28 22:45:48 2002 +0000 @@ -61,7 +61,7 @@ printf("bits/sample: %d\n",h->wBitsPerSample); printf("cbSize: %d\n",h->cbSize); if(h->wFormatTag==0x55 && h->cbSize>=12){ - MPEGLAYER3WAVEFORMAT* h2=h; + MPEGLAYER3WAVEFORMAT* h2=(MPEGLAYER3WAVEFORMAT *)h; printf("mp3.wID=%d\n",h2->wID); printf("mp3.fdwFlags=0x%X\n",h2->fdwFlags); printf("mp3.nBlockSize=%d\n",h2->nBlockSize); diff -r d3fd5d568594 -r 1e47c2e7aa8e loader/win32.c --- a/loader/win32.c Wed Aug 28 22:02:38 2002 +0000 +++ b/loader/win32.c Wed Aug 28 22:45:48 2002 +0000 @@ -4201,7 +4201,7 @@ /* ok, this is a hack, and a big memory leak. should be fixed. - alex */ { - HMODULE *hand; + HMODULE hand; WINE_MODREF *wm; void *func; diff -r d3fd5d568594 -r 1e47c2e7aa8e vidix/drivers/mga_vid.c --- a/vidix/drivers/mga_vid.c Wed Aug 28 22:02:38 2002 +0000 +++ b/vidix/drivers/mga_vid.c Wed Aug 28 22:45:48 2002 +0000 @@ -87,7 +87,7 @@ /* mapped physical addresses */ static uint8_t *mga_mmio_base = 0; -static uint32_t mga_mem_base = 0; +static uint8_t *mga_mem_base = 0; static int mga_src_base = 0; /* YUV buffer position in video memory */ @@ -685,7 +685,7 @@ int vixConfigPlayback(vidix_playback_t *config) { - int i; + unsigned int i; int x, y, sw, sh, dw, dh; int besleft, bestop, ifactor, ofsleft, ofstop, baseadrofs, weight, weights; #ifdef CRTC2 @@ -1179,7 +1179,7 @@ is_g400 = -1; - err = pci_scan(&lst, &num_pci); + err = pci_scan(lst, &num_pci); if (err) { printf("[mga] Error occured during pci scan: %s\n", strerror(err));