mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 03:52:25 +00:00
tools: Fix relative track switching
I have no idea where that "-2" came from, but it was obviously wrong. Just use modulo "total number of streams" to get the proper track id.
This commit is contained in:
parent
c7df116a3c
commit
4e2c7af46c
1 changed files with 1 additions and 3 deletions
|
@ -321,9 +321,7 @@ _execute_switch_track (GstValidateScenario * scenario,
|
|||
}
|
||||
|
||||
if (relative) { /* We are changing track relatively to current track */
|
||||
index = current + index;
|
||||
if (current >= n)
|
||||
index = -2;
|
||||
index = (current + index) % n;
|
||||
}
|
||||
|
||||
if (!disabling) {
|
||||
|
|
Loading…
Reference in a new issue