Index: modules/codec/ffmpeg/encoder.c
===================================================================
--- modules/codec/ffmpeg/encoder.c	(revision 9881)
+++ modules/codec/ffmpeg/encoder.c	(working copy)
@@ -156,8 +156,8 @@
 /*****************************************************************************
  * OpenEncoder: probe the encoder
  *****************************************************************************/
-extern int16_t ff_mpeg4_default_intra_matrix[];
-extern int16_t ff_mpeg4_default_non_intra_matrix[];
+extern int16_t VLC_USE_FROM_LIBRARY ff_mpeg4_default_intra_matrix[];
+extern int16_t VLC_USE_FROM_LIBRARY ff_mpeg4_default_non_intra_matrix[];
 
 int E_(OpenEncoder)( vlc_object_t *p_this )
 {
Index: modules/codec/ffmpeg/audio.c
===================================================================
--- modules/codec/ffmpeg/audio.c	(revision 9881)
+++ modules/codec/ffmpeg/audio.c	(working copy)
@@ -116,7 +116,7 @@
             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: include/vlc_common.h
===================================================================
--- include/vlc_common.h	(revision 9881)
+++ include/vlc_common.h	(working copy)
@@ -526,11 +526,11 @@
     {                                                                         \
         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) )                                           \
         {                                                                     \
@@ -900,9 +900,13 @@
 #   define UI64C(x)        x##ui64
 #endif /* defined(WIN32)||defined(UNDER_CE) */
 
+#define VLC_USE_FROM_LIBRARY
+
 #if defined(WIN32) || defined(UNDER_CE)
 /* win32, cl and icl support */
 #   if defined( _MSC_VER ) || !defined( __MINGW32__ )
+#       undef  VLC_USE_FROM_LIBRARY
+#       define VLC_USE_FROM_LIBRARY __declspec(dllimport)
 #       define __attribute__(x)
 #       define __inline__      __inline
 #       define S_IFBLK         0x3000  /* Block */
@@ -932,6 +936,7 @@
 #           define _OFF_T_DEFINED
 #       else
 #           define off_t __int64
+// for wx compatibility typedef long off_t;
 #       endif
 #   endif
 
@@ -956,13 +961,7 @@
 #       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) */
