]> git.sesse.net Git - vlc/commitdiff
control/media_list.c: Don't forget to increase the md refcount where needed.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 11 Aug 2007 13:48:35 +0000 (13:48 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 11 Aug 2007 13:48:35 +0000 (13:48 +0000)
src/control/media_list.c

index 3693a4b7355a4d432d63a9590bea6d9cb1b147bc..37729f3ff1f95c1856174f97e33a815bc8651e3d 100644 (file)
@@ -316,7 +316,9 @@ libvlc_media_list_item_at_index( libvlc_media_list_t * p_mlist,
                                  int index,
                                  libvlc_exception_t * p_e )
 {
-    return ARRAY_VAL( p_mlist->items, index );
+    libvlc_media_descriptor_t * p_md =  ARRAY_VAL( p_mlist->items, index );
+    libvlc_media_descriptor_retain( p_md );
+    return p_md;
 }
 
 /**************************************************************************