tests: check file exists before running appsink-src
authorLuis de Bethencourt <luis.bg@samsung.com>
Tue, 7 Apr 2015 14:30:30 +0000 (15:30 +0100)
committerLuis de Bethencourt <luis.bg@samsung.com>
Tue, 7 Apr 2015 14:30:30 +0000 (15:30 +0100)
tests/examples/app/appsink-src.c

index a5e18a7..b0de46b 100644 (file)
@@ -128,6 +128,11 @@ main (int argc, char *argv[])
   else
     filename = g_strdup ("/usr/share/sounds/ekiga/ring.wav");
 
+  if (!g_file_test (filename, G_FILE_TEST_EXISTS)) {
+    g_print ("File %s does not exist\n", filename);
+    return -1;
+  }
+
   data = g_new0 (ProgramData, 1);
 
   data->loop = g_main_loop_new (NULL, FALSE);