libvlc_media_player_set_xwindow() should only force the embed-xid "vout window"
plugin but not the xid "vout display" plugin.
This allows to use the GL "vout display" via EGL/GLX (with full hardware
acceleration) with an embedded X window.
Fixes#18907
This reverts commit 76118f5826.
It turns out this is actually an issue with libtool, cleaning the flags
when in link mode and removing the sanitizer flag.
It was fixed in libtool a5c6466528c060cc4660ad0319c00740db0e42ba
but there was no release since this fix.
Using sanitizer and no-undefined will cause linker errors on darwin due
to undefined symbols of the sanitizer.
This is adapted from a patch by Filip Roséen.
Since input_Control is executed asynchronously, current state may be
different to the state when INPUT_SET_STATE executing. Here is a use
case which is broken by check current state in
libvlc_media_player_set_pause():
1. current state is paused
2. call libvlc_media_player_play()
3. call libvlc_media_player_set_pause() immediately before
INPUT_SET_STATE PLAYING_S is executed, libvlc_media_player_set_pause()
will do nothing, so it looks like the pause request is been dropped
silently
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Libvlc users need to hold a reference to an item before using it. This avoid
use-after-free if the delete callback is called while an item is used by the
media player.
Instead of getting all the dictionary keys, and iterating over them to
get the associated values, only to free/release the associated data;
use vlc_dictionary_clear together with a callback to handle the work
for us.
These changes also fixes a potential null-pointer dereference if the
previous usage of vlc_dictionary_all_keys failed.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Like SD, and in fact most VLC object types, RD is not meant for objects
shared by multiple threads (input, vout, aout...). Using a custom
release makes no sense here.
This event was sent only when an ES was changed by libvlc. It was not sent when
an ES was changed by the input thread. To fix this issue, listen to the
INPUT_EVENT_ES input event (that is sent when an ES is added/deleted/selected)
to detect an ES selection change.
We don't want to trigger callbacks for "video-es"/"audio-es"/"spu-es" variables
from the input_thread since it's also listening to these callbacks and we want
to avoid a selecting busy loop.
This reverts commit 3add837059.
This commit was incomplete (missing audio/spu support) and is now done in vlc
core. See 8bc1b9ff8747be1b87730bea14a1b3778aed0bd6.