changeset 7127:1e47c2e7aa8e

mostly compiler warning fixes, some small bugfix patch by Dominik Mierzejewski <dominik@rangers.eu.org>
author arpi
date Wed, 28 Aug 2002 22:45:48 +0000
parents d3fd5d568594
children dc48f2130a76
files dll_init.c libmpcodecs/ad_a52.c libmpcodecs/native/nuppelvideo.c libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_real.c libmpcodecs/vd_svq1.c libmpcodecs/ve_divx4.c libmpcodecs/ve_lavc.c libmpcodecs/ve_libdv.c libmpcodecs/ve_rawrgb.c libmpcodecs/ve_vfw.c libmpcodecs/vf.c libmpcodecs/vf_lavc.c libmpcodecs/vf_palette.c libmpcodecs/vf_pp.c libmpcodecs/vf_rectangle.c libmpdemux/aviprint.c loader/win32.c vidix/drivers/mga_vid.c
diffstat 19 files changed, 41 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- 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);i<temp_len;i++) mp_msg(MSGT_WIN32, MSGL_DBG2, "%02X ",temp[i]);
--- a/libmpcodecs/ad_a52.c	Wed Aug 28 22:02:38 2002 +0000
+++ b/libmpcodecs/ad_a52.c	Wed Aug 28 22:45:48 2002 +0000
@@ -186,7 +186,7 @@
 		mp_msg(MSGT_DECAUDIO,MSGL_WARN,"a52: error at resampling\n");
 		break;
 	    }
-	    len+=2*a52_resample(a52_samples,&buf[len]);
+	    len+=2*a52_resample(a52_samples,(int16_t *)&buf[len]);
 	}
   return len;
 }
--- a/libmpcodecs/native/nuppelvideo.c	Wed Aug 28 22:02:38 2002 +0000
+++ b/libmpcodecs/native/nuppelvideo.c	Wed Aug 28 22:45:48 2002 +0000
@@ -44,7 +44,7 @@
 		/* tables are in encoded */
 		if (encodedh->comptype == '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);
 		}
--- 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){
--- 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();
--- 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 <ffmpeg/avcodec.h>
+#else
+#include "libavcodec/avcodec.h"
+#endif
+#endif
+
 #include "native/svq1.h"
 
 // to set/get/query special features/parameters
--- 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 <encore2.h>
 
@@ -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);
--- 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
--- 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 <libdv/dv.h>
 
+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
--- 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);
--- 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);
--- 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 <stdlib.h>
 #include <string.h>
 
+#include "../config.h"
 #ifdef HAVE_MALLOC_H
 #include <malloc.h>
 #endif
 
-#include "../config.h"
 #include "../mp_msg.h"
 #include "../help_mp.h"
 
--- 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);
 }
--- 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
--- 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){
--- 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;
 };
--- 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);
--- 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;
 
--- 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));