[vlc-devel] commit: Obligatory win32 compile fixes. (JP Dinger )

git version control git at videolan.org
Sat Dec 5 23:18:49 CET 2009


vlc | branch: master | JP Dinger <jpd at videolan.org> | Sat Dec  5 23:17:09 2009 +0100| [2227a86431ba2da1fdff09a28be2574ab0d2a2d0] | committer: JP Dinger 

Obligatory win32 compile fixes.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2227a86431ba2da1fdff09a28be2574ab0d2a2d0
---

 modules/access/dshow/dshow.cpp         |    9 +++++----
 modules/access/mms/mmstu.c             |    1 +
 modules/codec/dvbsub.c                 |    2 ++
 modules/codec/flac.c                   |    2 +-
 modules/demux/mkv/chapters.cpp         |    2 +-
 modules/demux/mkv/matroska_segment.cpp |    4 ++--
 modules/demux/nuv.c                    |    2 ++
 modules/demux/subtitle.c               |    2 ++
 modules/video_output/msw/directx.c     |    2 ++
 9 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index bcdcda8..710280c 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -1104,8 +1104,9 @@ static int OpenDevice( vlc_object_t *p_this, access_sys_t *p_sys,
             dshow_stream.p_device_filter = p_device_filter;
             dshow_stream.p_capture_filter = p_capture_filter;
 
-            p_sys->pp_streams = realloc_or_free( p_sys->pp_streams,
-                sizeof(dshow_stream_t *) * (p_sys->i_streams + 1) );
+            p_sys->pp_streams = (dshow_stream_t **)realloc_or_free(
+                                                           p_sys->pp_streams,
+                          sizeof(dshow_stream_t *) * (p_sys->i_streams + 1) );
             assert( p_sys->pp_streams );
             p_sys->pp_streams[p_sys->i_streams] = new dshow_stream_t;
             *p_sys->pp_streams[p_sys->i_streams++] = dshow_stream;
@@ -1967,10 +1968,10 @@ static int FindDevicesCallback( vlc_object_t *p_this, char const *psz_name,
 
     if( !list_devices.size() ) return VLC_SUCCESS;
 
-    p_item->ppsz_list = realloc_or_free( p_item->ppsz_list,
+    p_item->ppsz_list = (char**)realloc_or_free( p_item->ppsz_list,
                           (list_devices.size()+3) * sizeof(char *) );
     assert( p_item->ppsz_list );
-    p_item->ppsz_list_text = realloc_or_free( p_item->ppsz_list_text,
+    p_item->ppsz_list_text = (char**)realloc_or_free( p_item->ppsz_list_text,
                           (list_devices.size()+3) * sizeof(char *) );
     assert( p_item->ppsz_list_text );
 
diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c
index 89a772a..cf2ac5e 100644
--- a/modules/access/mms/mmstu.c
+++ b/modules/access/mms/mmstu.c
@@ -31,6 +31,7 @@
 
 #include <vlc_common.h>
 #include <vlc_access.h>
+#include <vlc_memory.h>
 
 #include <errno.h>
 #include <assert.h>
diff --git a/modules/codec/dvbsub.c b/modules/codec/dvbsub.c
index 47ad7db..4fecfc3 100644
--- a/modules/codec/dvbsub.c
+++ b/modules/codec/dvbsub.c
@@ -71,6 +71,8 @@
 # include "config.h"
 #endif
 
+#include <assert.h>
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_codec.h>
diff --git a/modules/codec/flac.c b/modules/codec/flac.c
index 13f0e30..449ecf6 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -367,7 +367,7 @@ static void ProcessHeader( decoder_t *p_dec )
         p_dec->fmt_out.i_extra = p_dec->fmt_in.i_extra;
         p_dec->fmt_out.p_extra = realloc_or_free( p_dec->fmt_out.p_extra,
                                                   p_dec->fmt_out.i_extra );
-        assert( p_dec->fmt_out.p_extra );
+        /*assert( p_dec->fmt_out.p_extra ); assert undefined here? */
         memcpy( p_dec->fmt_out.p_extra,
                 p_dec->fmt_in.p_extra, p_dec->fmt_out.i_extra );
     }
diff --git a/modules/demux/mkv/chapters.cpp b/modules/demux/mkv/chapters.cpp
index 2772f70..1272eb1 100644
--- a/modules/demux/mkv/chapters.cpp
+++ b/modules/demux/mkv/chapters.cpp
@@ -65,7 +65,7 @@ int chapter_item_c::PublishChapters( input_title_t & title, int & i_user_chapter
 
         // A start time of '0' is ok. A missing ChapterTime element is ok, too, because '0' is its default value.
         title.i_seekpoint++;
-        title.seekpoint = realloc_or_free( title.seekpoint,
+        title.seekpoint = (seekpoint_t**)realloc_or_free( title.seekpoint,
                                  title.i_seekpoint * sizeof( seekpoint_t* ) );
         assert( title.seekpoint );
         title.seekpoint[title.i_seekpoint-1] = sk;
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 67124c7..7c6f2b6 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -182,7 +182,7 @@ void matroska_segment_c::LoadCues( KaxCues *cues )
             if( i_index >= i_index_max )
             {
                 i_index_max += 1024;
-                p_indexes = realloc_or_free( p_indexes,
+                p_indexes = (mkv_index_t*)realloc_or_free( p_indexes,
                                         sizeof( mkv_index_t ) * i_index_max );
                 assert( p_indexes );
             }
@@ -377,7 +377,7 @@ void matroska_segment_c::IndexAppendCluster( KaxCluster *cluster )
     if( i_index >= i_index_max )
     {
         i_index_max += 1024;
-        p_indexes = realloc_or_free( p_indexes,
+        p_indexes = (mkv_index_t*)realloc_or_free( p_indexes,
                                         sizeof( mkv_index_t ) * i_index_max );
         assert( p_indexes );
     }
diff --git a/modules/demux/nuv.c b/modules/demux/nuv.c
index 31abc97..0230ec2 100644
--- a/modules/demux/nuv.c
+++ b/modules/demux/nuv.c
@@ -29,6 +29,8 @@
 # include "config.h"
 #endif
 
+#include <assert.h>
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_demux.h>
diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index 69e6978..f791ddd 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -31,6 +31,8 @@
 # include "config.h"
 #endif
 
+#include <assert.h>
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_input.h>
diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c
index c2a1fa5..10b401d 100644
--- a/modules/video_output/msw/directx.c
+++ b/modules/video_output/msw/directx.c
@@ -38,6 +38,8 @@
 # include "config.h"
 #endif
 
+#include <assert.h>
+
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_vout.h>




More information about the vlc-devel mailing list