X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=test%2Flibvlc%2Fmeta.c;h=aa29c98406f8444de7a3c6d3a59b621fd9e4ed1a;hb=c4050dc359d9447606f5111c704e9addef99b6a6;hp=3743733ee5d05bd0212971b058216eeeb82592cd;hpb=9d5e75a7a5643a2144dc561fc246a7a3ca7e5fb0;p=vlc diff --git a/test/libvlc/meta.c b/test/libvlc/meta.c index 3743733ee5..aa29c98406 100644 --- a/test/libvlc/meta.c +++ b/test/libvlc/meta.c @@ -22,7 +22,7 @@ * http://www.gnu.org/copyleft/gpl.html * **********************************************************************/ -#include +#include #include "test.h" @@ -34,30 +34,15 @@ static void test_meta (const char ** argv, int argc) log ("Testing meta\n"); - libvlc_exception_init (&ex); - vlc = libvlc_new (argc, argv, &ex); - catch (); + vlc = libvlc_new (argc, argv); + assert (vlc != NULL); - media = libvlc_media_new (vlc, "samples/meta.sample", &ex); - catch (); + media = libvlc_media_new_path (vlc, "samples/meta.sample"); + assert( media ); - /* Tell that we are interested in this precise meta data - * This is needed to trigger meta data reading - * (the first calls return NULL) */ - artist = libvlc_media_get_meta (media, libvlc_meta_Artist, &ex); - catch (); + libvlc_media_parse (media); - free (artist); - - /* Wait for the meta */ - while (!libvlc_media_is_preparsed (media, &ex)) - { - catch (); - usleep (10000); - } - - artist = libvlc_media_get_meta (media, libvlc_meta_Artist, &ex); - catch (); + artist = libvlc_media_get_meta (media, libvlc_meta_Artist); const char *expected_artist = "mike";