diff --git a/validate/gst/validate/gst-validate-scenario.c b/validate/gst/validate/gst-validate-scenario.c index 11bda7fe53..94d74dc9ec 100644 --- a/validate/gst/validate/gst-validate-scenario.c +++ b/validate/gst/validate/gst-validate-scenario.c @@ -1257,7 +1257,8 @@ switch_stream (GstValidatePipelineMonitor * monitor, GstValidateAction * action, if (relative) { /* We are changing track relatively to current track */ index = (current + index) % n; - } + } else + index %= n; /* Add the new stream we want to switch to */ s = streams[index];