[0.11] gstreamer: tests: clockstress: perform sanity check on thread number argument
Sebastian Dröge
slomo at kemper.freedesktop.org
Wed Jan 25 02:43:33 PST 2012
Module: gstreamer
Branch: 0.11
Commit: 4f697df84c669ad1517fd1e4e8d3b76d1896328f
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=4f697df84c669ad1517fd1e4e8d3b76d1896328f
Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date: Thu Jan 19 12:57:48 2012 +0100
tests: clockstress: perform sanity check on thread number argument
---
tests/benchmarks/gstclockstress.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/tests/benchmarks/gstclockstress.c b/tests/benchmarks/gstclockstress.c
index 60895d9..ed89840 100644
--- a/tests/benchmarks/gstclockstress.c
+++ b/tests/benchmarks/gstclockstress.c
@@ -60,6 +60,11 @@ main (gint argc, gchar * argv[])
num_threads = atoi (argv[1]);
+ if (num_threads <= 0 || num_threads > MAX_THREADS) {
+ g_print ("number of threads must be between 0 and %d\n", MAX_THREADS);
+ exit (-2);
+ }
+
sysclock = gst_system_clock_obtain ();
for (t = 0; t < num_threads; t++) {
More information about the gstreamer-commits
mailing list