mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
tools: gst-play: cycle between video tracks without disabling video
This commit is contained in:
parent
5eee006667
commit
c90f18994c
1 changed files with 5 additions and 2 deletions
|
@ -963,7 +963,7 @@ play_cycle_track_selection (GstPlay * play, GstPlayTrackType track_type)
|
|||
else
|
||||
cur = (cur + 1) % (n + 1);
|
||||
|
||||
if (cur >= n) {
|
||||
if (cur >= n && track_type != GST_PLAY_TRACK_TYPE_VIDEO) {
|
||||
cur = -1;
|
||||
g_print ("Disabling %s. \n", name);
|
||||
if (cur_flags & flag) {
|
||||
|
@ -971,7 +971,10 @@ play_cycle_track_selection (GstPlay * play, GstPlayTrackType track_type)
|
|||
g_object_set (play->playbin, "flags", cur_flags, NULL);
|
||||
}
|
||||
} else {
|
||||
if (!(cur_flags & flag)) {
|
||||
/* For video we only want to switch between streams, not disable it altogether */
|
||||
if (cur >= n)
|
||||
cur = 0;
|
||||
if (!(cur_flags & flag) && track_type != GST_PLAY_TRACK_TYPE_VIDEO) {
|
||||
cur_flags |= flag;
|
||||
g_object_set (play->playbin, "flags", cur_flags, NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue