[vlc-commits] [Git][videolan/vlc][master] lua/input: disable tracks whence toggling ID -1
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Mon May 16 16:27:21 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
44b88a9d by Rémi Denis-Courmont at 2022-05-16T16:12:29+00:00
lua/input: disable tracks whence toggling ID -1
This matches the pre-4.0 behaviour expected in existing Lua scripts.
Fixes #26937.
- - - - -
1 changed file:
- modules/lua/libs/input.c
Changes:
=====================================
modules/lua/libs/input.c
=====================================
@@ -368,13 +368,18 @@ static int vlclua_player_toggle_track_(lua_State *L,
vlc_player_Lock(player);
- const struct vlc_player_track *track = FindTrack(player, cat, id);
- if (track) {
- if (track->selected)
- vlc_player_UnselectTrack(player, track);
- else
- vlc_player_SelectTrack(player, track, VLC_PLAYER_SELECT_EXCLUSIVE);
- }
+ if (id != -1) {
+ const struct vlc_player_track *track = FindTrack(player, cat, id);
+
+ if (track != NULL) {
+ if (track->selected)
+ vlc_player_UnselectTrack(player, track);
+ else
+ vlc_player_SelectTrack(player, track,
+ VLC_PLAYER_SELECT_EXCLUSIVE);
+ }
+ } else
+ vlc_player_UnselectTrackCategory(player, cat);
vlc_player_Unlock(player);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/44b88a9d6860af9f22b7006c3d28a23a8fb1f9d3
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/44b88a9d6860af9f22b7006c3d28a23a8fb1f9d3
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list