]> git.sesse.net Git - vlc/blobdiff - test/libvlc/media_list.c
avcodec: fix memory leaks of frame side-data
[vlc] / test / libvlc / media_list.c
index a8e5f024937ba06177db49c17f7c9c9592b1ce74..7eab6b9f48dd4f6912e49f0abd89ece90b7e3369 100644 (file)
@@ -32,18 +32,17 @@ static void test_media_list (const char ** argv, int argc)
 
     log ("Testing media_list\n");
 
-    libvlc_exception_init (&ex);
     vlc = libvlc_new (argc, argv);
     assert (vlc != NULL);
 
     ml = libvlc_media_list_new (vlc);
     assert (ml != NULL);
 
-    md1 = libvlc_media_new (vlc, "/dev/null");
+    md1 = libvlc_media_new_path (vlc, "/dev/null");
     assert (md1 != NULL);
-    md2 = libvlc_media_new (vlc, "/dev/null");
+    md2 = libvlc_media_new_path (vlc, "/dev/null");
     assert (md2 != NULL);
-    md3 = libvlc_media_new (vlc, "/dev/null");
+    md3 = libvlc_media_new_path (vlc, "/dev/null");
     assert (md3 != NULL);
 
     ret = libvlc_media_list_add_media (ml, md1);
@@ -82,8 +81,8 @@ static void test_media_list (const char ** argv, int argc)
 
     assert ( libvlc_media_list_item_at_index (ml, 2) == md3 );
 
-    /* test if give exceptions, when it should */
-    /* have 4 items, so index 4 should give exception */
+    /* test if give errors, when it should */
+    /* have 4 items, so index 4 should give error */
     ret = libvlc_media_list_remove_index (ml, 4);
     assert (ret == -1);
 
@@ -104,7 +103,7 @@ static void test_media_list (const char ** argv, int argc)
     p_non_exist = libvlc_media_list_item_at_index (ml, -1);
     assert (p_non_exist == NULL);
 
-    md4 = libvlc_media_new (vlc, "/dev/null");
+    md4 = libvlc_media_new_path (vlc, "/dev/null");
     assert (md4 != NULL);
 
     /* try to find non inserted item */
@@ -120,7 +119,6 @@ static void test_media_list (const char ** argv, int argc)
     libvlc_media_list_release (ml);
 
     libvlc_release (vlc);
-    catch ();
 }
 
 int main (void)