]> git.sesse.net Git - vlc/blobdiff - src/input/input.c
Made stream_t size and position unsigned.
[vlc] / src / input / input.c
index cbd208b6707bbbfe0887034f5937e085aee6f650..049d54027b086f5f2f93376b50f8d7a6a036c20e 100644 (file)
@@ -312,6 +312,8 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
     if( p_input == NULL )
         return NULL;
 
+    vlc_object_attach( p_input, p_parent );
+
     /* Construct a nice name for the input timer */
     char psz_timer_name[255];
     char * psz_name = input_item_GetName( p_item );
@@ -478,9 +480,6 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
     /* Set the destructor when we are sure we are initialized */
     vlc_object_set_destructor( p_input, (vlc_destructor_t)Destructor );
 
-    /* Attach only once we are ready */
-    vlc_object_attach( p_input, p_parent );
-
     return p_input;
 }
 
@@ -2187,7 +2186,7 @@ static bool Control( input_thread_t *p_input,
             else if( bookmark.i_byte_offset >= 0 &&
                      p_input->p->input.p_stream )
             {
-                const int64_t i_size = stream_Size( p_input->p->input.p_stream );
+                const uint64_t i_size = stream_Size( p_input->p->input.p_stream );
                 if( i_size > 0 && bookmark.i_byte_offset <= i_size )
                 {
                     val.f_float = (double)bookmark.i_byte_offset / i_size;
@@ -3117,8 +3116,8 @@ void input_SplitMRL( const char **ppsz_access, const char **ppsz_demux, char **p
     {
         psz_path = psz_dup;
     }
-    *ppsz_access = psz_access ? psz_access : (char*)"";
-    *ppsz_demux = psz_demux ? psz_demux : (char*)"";
+    *ppsz_access = psz_access ? psz_access : "";
+    *ppsz_demux = psz_demux ? psz_demux : "";
     *ppsz_path = psz_path;
 }