]> git.sesse.net Git - vlc/commitdiff
* src/playlist/*: a couple of compilation fixes.
authorGildas Bazin <gbazin@videolan.org>
Fri, 12 Nov 2004 15:41:22 +0000 (15:41 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 12 Nov 2004 15:41:22 +0000 (15:41 +0000)
src/playlist/item.c
src/playlist/playlist.c
src/playlist/view.c

index eec3214126e9b540b4e0c4233d41f0aa4b60bc97..ff5a69cbc0bd67deb6ad288b6bd3c556e6537a94 100644 (file)
@@ -246,7 +246,7 @@ int playlist_ItemSetDuration( playlist_item_t *p_item, mtime_t i_duration )
         p_item->input.i_duration = i_duration;
         if( i_duration != -1 )
         {
-            secstotimestr( psz_buffer, i_duration/1000000 );
+            secstotimestr( psz_buffer, (int)(i_duration/1000000) );
         }
         else
         {
@@ -291,5 +291,5 @@ static void GuessType( input_item_t *p_item)
             return;
         }
     }
-    return ITEM_TYPE_UNKNOWN;
+    p_item->i_type = ITEM_TYPE_UNKNOWN;
 }
index a6b1e843359b972e8dbcaebe5811ba6304e58eaa..bce66caaf01b7d154b0cb550df05b86771077f53 100644 (file)
@@ -221,11 +221,11 @@ int playlist_Control( playlist_t * p_playlist, int i_query, ... )
 
 int playlist_vaControl( playlist_t * p_playlist, int i_query, va_list args )
 {
-    vlc_mutex_lock( &p_playlist->object_lock );
-
     playlist_view_t *p_view;
     vlc_value_t val;
 
+    vlc_mutex_lock( &p_playlist->object_lock );
+
 #ifdef PLAYLIST_PROFILE
     p_playlist->request_date = mdate();
 #endif
index 82c160e70d033f91362ac94df25ee87808a26a5f..b4618e61e048ff80f1683ee47d1f109fc78a5904 100644 (file)
@@ -90,7 +90,8 @@ playlist_view_t * playlist_ViewCreate( playlist_t *p_playlist, int i_id,
  */
 int playlist_ViewInsert( playlist_t *p_playlist, int i_id, char *psz_name )
 {
-    playlist_view_t *p_view = playlist_ViewCreate( p_playlist, i_id , psz_name);
+    playlist_view_t *p_view =
+        playlist_ViewCreate( p_playlist, i_id , psz_name );
     if( !p_view )
     {
         msg_Err( p_playlist, "Creation failed" );
@@ -99,12 +100,11 @@ int playlist_ViewInsert( playlist_t *p_playlist, int i_id, char *psz_name )
 
     vlc_mutex_lock( &p_playlist->object_lock );
 
-    INSERT_ELEM( p_playlist->pp_views,
-                 p_playlist->i_views,
-                 p_playlist->i_views,
-                 p_view );
+    INSERT_ELEM( p_playlist->pp_views, p_playlist->i_views,
+                 p_playlist->i_views, p_view );
 
     vlc_mutex_unlock( &p_playlist->object_lock );
+    return VLC_SUCCESS;
 }