]> git.sesse.net Git - vlc/blobdiff - src/input/vlmshell.c
Added input internal es_out_GetEsObjects to retreives decoder associated objects.
[vlc] / src / input / vlmshell.c
index e9be2c50aa58e5333cd006ad96694a26875188d6..590c8f47d1a7b61fca6a9cceac140d5828a2876d 100644 (file)
@@ -31,7 +31,6 @@
 #endif
 
 #include <vlc_common.h>
-#include <vlc_memory.h>
 
 #include <stdio.h>
 #include <ctype.h>                                              /* tolower() */
 
 #ifdef ENABLE_VLM
 
-#ifndef WIN32
-#   include <sys/time.h>                                   /* gettimeofday() */
-#endif
-
 #include <time.h>                                                 /* ctime() */
 
 #include <vlc_input.h>
@@ -566,7 +561,7 @@ error:
 static int ExecuteLoad( vlm_t *p_vlm, const char *psz_url, vlm_message_t **pp_status )
 {
     stream_t *p_stream = stream_UrlNew( p_vlm, psz_url );
-    int64_t i_size;
+    uint64_t i_size;
     char *psz_buffer;
 
     if( !p_stream )
@@ -585,6 +580,8 @@ static int ExecuteLoad( vlm_t *p_vlm, const char *psz_url, vlm_message_t **pp_st
     }
 
     i_size = stream_Size( p_stream );
+    if( i_size > SIZE_MAX - 1 )
+        i_size = SIZE_MAX - 1;
 
     psz_buffer = malloc( i_size + 1 );
     if( !psz_buffer )
@@ -641,9 +638,8 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
             psz_line = strdup( ppsz_property[i] );
             for( j = i+1; j < i_property; j++ )
             {
-                psz_line = realloc_or_free( psz_line,
+                psz_line = xrealloc( psz_line,
                         strlen(psz_line) + strlen(ppsz_property[j]) + 1 + 1 );
-                assert( psz_line );
                 strcat( psz_line, " " );
                 strcat( psz_line, ppsz_property[j] );
             }