mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
tests: clockstress: perform sanity check on thread number argument
This commit is contained in:
parent
6ede81d18e
commit
4f697df84c
1 changed files with 5 additions and 0 deletions
|
@ -60,6 +60,11 @@ main (gint argc, gchar * argv[])
|
||||||
|
|
||||||
num_threads = atoi (argv[1]);
|
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 ();
|
sysclock = gst_system_clock_obtain ();
|
||||||
|
|
||||||
for (t = 0; t < num_threads; t++) {
|
for (t = 0; t < num_threads; t++) {
|
||||||
|
|
Loading…
Reference in a new issue