projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7df116
)
tools: Fix relative track switching
author
Edward Hervey
<edward@centricular.com>
Wed, 20 Jan 2016 12:42:31 +0000
(13:42 +0100)
committer
Edward Hervey
<bilboed@bilboed.com>
Thu, 21 Jan 2016 13:30:46 +0000
(14:30 +0100)
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.
validate/tools/gst-validate.c
patch
|
blob
|
history
diff --git
a/validate/tools/gst-validate.c
b/validate/tools/gst-validate.c
index
98f4856
..
8a76937
100644
(file)
--- a/
validate/tools/gst-validate.c
+++ b/
validate/tools/gst-validate.c
@@
-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) {