]> git.sesse.net Git - vlc/commitdiff
* include/vlc_common.h, include/modules_inner.h, modules/codec/ffmpeg/: MSVC build...
authorGildas Bazin <gbazin@videolan.org>
Mon, 7 Feb 2005 10:44:49 +0000 (10:44 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 7 Feb 2005 10:44:49 +0000 (10:44 +0000)
include/modules_inner.h
include/vlc_common.h
modules/codec/ffmpeg/audio.c
modules/codec/ffmpeg/encoder.c

index 8a408515b4211af3413b53268e7540a5c466bcfa..bebaf0c7e020978df16aa42bbd71c1fd9d6ad0ad 100644 (file)
 #   define EXTERN_SYMBOL
 #endif
 
+#if defined( USE_DLL )
+#   define IMPORT_SYMBOL __declspec(dllimport)
+#else
+#   define IMPORT_SYMBOL
+#endif
+
 #define MODULE_STRING STRINGIFY( MODULE_NAME )
 
 /*
index 1e5a0dfa79b82dcc98008adfe53b412b83232368..93cd22cc22b10e4b85261daa64c2eeb2ff08e2d7 100644 (file)
@@ -526,11 +526,11 @@ static int64_t GCD( int64_t a, int64_t b )
     {                                                                         \
         if( i_oldsize )                                                       \
         {                                                                     \
-            (p_ar) = realloc( p_ar, ((i_oldsize) + 1) * sizeof( *(p_ar) ) );  \
+            (p_ar) = (void**)realloc( p_ar, ((i_oldsize) + 1) * sizeof( *(p_ar) ) );  \
         }                                                                     \
         else                                                                  \
         {                                                                     \
-            (p_ar) = malloc( ((i_oldsize) + 1) * sizeof( *(p_ar) ) );         \
+            (p_ar) = (void**)malloc( ((i_oldsize) + 1) * sizeof( *(p_ar) ) ); \
         }                                                                     \
         if( (i_oldsize) - (i_pos) )                                           \
         {                                                                     \
@@ -932,6 +932,7 @@ typedef __int64 off_t;
 #           define _OFF_T_DEFINED
 #       else
 #           define off_t __int64
+            /* for wx compatibility typedef long off_t; */
 #       endif
 #   endif
 
@@ -956,13 +957,7 @@ typedef __int64 off_t;
 #       define vsnprintf _vsnprintf
 #   endif
 
-#   ifndef _T
-#       ifdef UNICODE
-#           define _T(q) L##q
-#       else
-#           define _T(q) q
-#       endif
-#   endif
+#   include <tchar.h>
 #endif
 
 /* lseek (defined in src/extras/libc.c) */
index 31f79a1d4177b2f4815ade6deedb15d05d3045dd..5b33b95931fe02ce23f0ee089d859b3d50361961 100644 (file)
@@ -116,7 +116,7 @@ int E_(InitAudioDec)( decoder_t *p_dec, AVCodecContext *p_context,
             malloc( p_dec->fmt_in.i_extra + FF_INPUT_BUFFER_PADDING_SIZE );
         memcpy( p_sys->p_context->extradata,
                 p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra );
-        memset( p_sys->p_context->extradata + p_dec->fmt_in.i_extra, 0,
+        memset( (char*)p_sys->p_context->extradata + p_dec->fmt_in.i_extra, 0,
                 FF_INPUT_BUFFER_PADDING_SIZE );
     }
 
index ab8b6731549e0b8458c747d98a66d0e272490d0b..f089afa7836558108c8c73735a0239834817ae54 100644 (file)
@@ -156,8 +156,8 @@ static const char *ppsz_enc_options[] = {
 /*****************************************************************************
  * OpenEncoder: probe the encoder
  *****************************************************************************/
-extern int16_t ff_mpeg4_default_intra_matrix[];
-extern int16_t ff_mpeg4_default_non_intra_matrix[];
+extern int16_t IMPORT_SYMBOL ff_mpeg4_default_intra_matrix[];
+extern int16_t IMPORT_SYMBOL ff_mpeg4_default_non_intra_matrix[];
 
 int E_(OpenEncoder)( vlc_object_t *p_this )
 {