[vlc-commits] [Git][videolan/vlc][master] player: vout: check NULL before var_TriggerCallback
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Aug 28 08:55:20 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
db87ee04 by Alexandre Janniaux at 2026-08-28T08:45:48+00:00
player: vout: check NULL before var_TriggerCallback
input_resource_HoldVout() returns NULL by design when the resource has
no vout, but nothing checked for NULL at all, leading to crash when
trying to trigger the callback. vlc_player_vout_Snapshot() triggered
this issue when playing audio.
In the core, we're supposed to return dummy vout when the vout is not
started yet so that settings can work, but this doesn't work when not
playing video at all.
Reproduced by playing an audio item with -I cli and asking for a
snapshot from the cli.
- - - - -
1 changed file:
- src/player/vout.c
Changes:
=====================================
src/player/vout.c
=====================================
@@ -172,6 +172,8 @@ vlc_player_vout_TriggerOption(vlc_player_t *player, const char *option)
/* Don't use vlc_player_vout_Hold() since there is nothing to trigger if it
* returns a dummy vout */
vout_thread_t *vout = input_resource_HoldVout(player->resource);
+ if (vout == NULL)
+ return;
var_TriggerCallback(vout, option);
vout_Release(vout);
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/db87ee04d704e5802e7623a1f20ebddf6b4e0006
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/db87ee04d704e5802e7623a1f20ebddf6b4e0006
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list