summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2015-08-22 20:59:40 +1000
committerJan Schmidt <jan@centricular.com>2015-09-03 22:20:11 +1000
commit22b618836ee332fce9fc83cfdcd9050305605ee0 (patch)
treee438ea3830419f2d856cf90324585a4c72ccbce8
parent2a41502cde51f736b37791bd78fe97f0cf8c3d05 (diff)
test-mp4: Support filenames with spaces in them. Error out on too few arguments
-rw-r--r--examples/test-mp4.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/test-mp4.c b/examples/test-mp4.c
index 263d122..9bcaab4 100644
--- a/examples/test-mp4.c
+++ b/examples/test-mp4.c
@@ -104,6 +104,11 @@ main (int argc, char *argv[])
g_printerr ("Error parsing options: %s\n", error->message);
return -1;
}
+
+ if (argc < 2) {
+ g_print ("%s\n", g_option_context_get_help (optctx, TRUE, NULL));
+ return 1;
+ }
g_option_context_free (optctx);
loop = g_main_loop_new (NULL, FALSE);
@@ -117,7 +122,7 @@ main (int argc, char *argv[])
mounts = gst_rtsp_server_get_mount_points (server);
str = g_strdup_printf ("( "
- "filesrc location=%s ! qtdemux name=d "
+ "filesrc location=\"%s\" ! qtdemux name=d "
"d. ! queue ! rtph264pay pt=96 name=pay0 "
"d. ! queue ! rtpmp4apay pt=97 name=pay1 " ")", argv[1]);