summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-05-06 12:58:07 +0200
committerChristian Grothoff <christian@grothoff.org>2021-05-06 12:58:07 +0200
commit3466604202089c9381af32b138683e5ac2d9ed67 (patch)
tree2c742fee1bae1bfa83bde877b528c0caf89ba9a3
parent4684001abc50706c6c5696623d6285edd58fcf99 (diff)
test with media_new_path
-rw-r--r--src/plugins/test-vlc.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/plugins/test-vlc.c b/src/plugins/test-vlc.c
index c80f6b6..6bef893 100644
--- a/src/plugins/test-vlc.c
+++ b/src/plugins/test-vlc.c
@@ -161,25 +161,13 @@ main(int argc,
libvlc_log_set (vlc,
&my_logger,
NULL);
- fprintf (stderr,
- "Opening file `%s'\n",
- argv[1]);
- {
- int fd = open (argv[1],
- O_RDONLY);
- if (-1 == fd)
- {
- fprintf (stderr,
- "Open failed: %s\n",
- strerror (errno));
- libvlc_release (vlc);
- return;
- }
- media = libvlc_media_new_fd (vlc,
- fd);
- }
+ media = libvlc_media_new_path (vlc,
+ argv[1]);
if (NULL == media)
{
+ fprintf (stderr,
+ "Opening path `%s' failed!\n",
+ argv[1]);
libvlc_release (vlc);
return;
}
@@ -205,7 +193,7 @@ main(int argc,
}
fprintf (stderr,
"Sleeping\n");
- sleep (1);
+ sleep (2);
extract (NULL,
media);
libvlc_media_release (media);