[vlc-commits] test: player: a ctx can be used without outputs

Thomas Guillem git at videolan.org
Fri May 10 14:36:36 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri May 10 11:00:12 2019 +0200| [5ac82dd4b037684a4061970cf87e220bde72a4c5] | committer: Thomas Guillem

test: player: a ctx can be used without outputs

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ac82dd4b037684a4061970cf87e220bde72a4c5
---

 test/src/input/player.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/src/input/player.c b/test/src/input/player.c
index 030276c9b7..b70542403a 100644
--- a/test/src/input/player.c
+++ b/test/src/input/player.c
@@ -1750,9 +1750,9 @@ REPORT_LIST
 }
 
 static void
-ctx_init(struct ctx *ctx)
+ctx_init(struct ctx *ctx, bool use_outputs)
 {
-    static const char * argv[] = {
+    const char * argv[] = {
         "-v",
         "--ignore-config",
         "-Idummy",
@@ -1760,8 +1760,8 @@ ctx_init(struct ctx *ctx)
         /* Avoid leaks from various dlopen... */
         "--codec=araw,rawvideo,subsdec,none",
         "--dec-dev=none",
-        "--vout=dummy",
-        "--aout=dummy",
+        use_outputs ? "--vout=dummy" : "--vout=none",
+        use_outputs ? "--aout=dummy" : "--aout=none",
     };
     libvlc_instance_t *vlc = libvlc_new(ARRAY_SIZE(argv), argv);
     assert(vlc);
@@ -1809,7 +1809,7 @@ main(void)
 
     struct ctx ctx;
 
-    ctx_init(&ctx);
+    ctx_init(&ctx, true);
 
     test_outputs(&ctx); /* Must be the first test */
 



More information about the vlc-commits mailing list