]> git.sesse.net Git - vlc/commitdiff
Most compiler warning fixed
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 25 Jun 2005 17:21:23 +0000 (17:21 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 25 Jun 2005 17:21:23 +0000 (17:21 +0000)
modules/codec/dmo/buffer.c
modules/codec/dmo/dmo.c
modules/codec/dmo/dmo.h

index d0ea39e02227137038e0c4971dd9adb912ef64e3..e0d05fe38b6a573da8d79af27eabd4fe674add38 100644 (file)
@@ -88,7 +88,7 @@ static long STDCALL Release( IUnknown *This )
 static long STDCALL SetLength( IMediaBuffer *This, uint32_t cbLength )
 {
     CMediaBuffer *p_mb = (CMediaBuffer *)This;
-    if( cbLength > p_mb->i_max_size ) return E_INVALIDARG;
+    if( cbLength > (uint32_t)p_mb->i_max_size ) return E_INVALIDARG;
     p_mb->p_block->i_buffer = cbLength;
     return S_OK;
 }
index 3026b9523f8df65b4c26cd950c69625f39c26891..5638273714d0f12009837116c10fdb100619b493 100644 (file)
@@ -391,7 +391,8 @@ static int DecOpen( vlc_object_t *p_this )
     {
         BITMAPINFOHEADER *p_bih;
         DMO_MEDIA_TYPE mt;
-        int i_chroma = VLC_FOURCC('Y','U','Y','2'), i_planes = 1, i_bpp = 16;
+        unsigned i_chroma = VLC_FOURCC('Y','U','Y','2');
+        int i_planes = 1, i_bpp = 16;
         int i = 0;
 
         /* Find out which chroma to use */
@@ -549,7 +550,7 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
     GETCLASS GetClass;
     IClassFactory *cFactory = NULL;
     IUnknown *cObject = NULL;
-    codec_dll *codecs_table = b_out ? encoders_table : decoders_table;
+    const codec_dll *codecs_table = b_out ? encoders_table : decoders_table;
     int i_codec;
 
     /* Look for a DMO which can handle the requested codec */
@@ -634,9 +635,10 @@ static int LoadDMO( vlc_object_t *p_this, HINSTANCE *p_hmsdmo_dll,
     }
 
     return VLC_SUCCESS;
+
+loader:
 #endif   /* LOADER */
 
- loader:
     for( i_codec = 0; codecs_table[i_codec].i_fourcc != 0; i_codec++ )
     {
         if( codecs_table[i_codec].i_fourcc == p_fmt->i_codec )
@@ -788,7 +790,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 #endif
             return NULL;
         }
-        else if( i_result == DMO_E_NOTACCEPTING )
+        else if( i_result == (int)DMO_E_NOTACCEPTING )
         {
             /* Need to call ProcessOutput */
             msg_Dbg( p_dec, "ProcessInput(): not accepting" );
@@ -1113,7 +1115,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
         memcpy( p_vih, dmo_type.pbFormat, dmo_type.cbFormat );
         memcpy( ((uint8_t *)p_vih) + dmo_type.cbFormat, p_data, i_data );
         DMOFreeMediaType( &dmo_type );
-        dmo_type.pbFormat = p_vih;
+        dmo_type.pbFormat = (char*)p_vih;
         dmo_type.cbFormat = i_vih;
 
         msg_Dbg( p_enc, "found extra data: %i", i_data );
@@ -1452,7 +1454,7 @@ static block_t *EncodeBlock( encoder_t *p_enc, void *p_data )
 #endif
         return NULL;
     }
-    else if( i_result == DMO_E_NOTACCEPTING )
+    else if( i_result == (int)DMO_E_NOTACCEPTING )
     {
         /* Need to call ProcessOutput */
         msg_Dbg( p_enc, "ProcessInput(): not accepting" );
index b1ea174adaf20948438e36aad37420b9bb95225c..0449dcb86a727aeacb516b2fbdd54cf8e897c34f 100644 (file)
@@ -37,6 +37,9 @@ static const GUID MEDIASUBTYPE_YV12 = {0x32315659, 0x0000, 0x0010, {0x80, 0x00,
 static const GUID MEDIASUBTYPE_RGB24 = {0xe436eb7d, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
 static const GUID MEDIASUBTYPE_RGB565 = {0xe436eb7b, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}};
 
+void* CoTaskMemAlloc(unsigned long cb);
+void CoTaskMemFree(void* cb);
+
 #define IUnknown IUnknownHack
 #define IClassFactory IClassFactoryHack
 typedef struct _IUnknown IUnknown;