[vlc-devel] [PATCH 5/5] lib: media_player: fix aout callbacks having no effects
Thomas Guillem
thomas at gllm.fr
Wed Jul 22 15:51:11 CEST 2020
The main aout need to be reset after changing aout callbacks variables.
Regression from c0c35a50025df54cee95ddb00b325438b1f47e5e
---
lib/media_player.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/media_player.c b/lib/media_player.c
index b00984753ea..6ec6025022b 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1258,12 +1258,16 @@ void libvlc_audio_set_callbacks( libvlc_media_player_t *mp,
var_SetAddress( mp, "amem-drain", drain_cb );
var_SetAddress( mp, "amem-data", opaque );
var_SetString( mp, "aout", "amem,none" );
+
+ vlc_player_aout_Reset( mp->player );
}
void libvlc_audio_set_volume_callback( libvlc_media_player_t *mp,
libvlc_audio_set_volume_cb cb )
{
var_SetAddress( mp, "amem-set-volume", cb );
+
+ vlc_player_aout_Reset( mp->player );
}
void libvlc_audio_set_format_callbacks( libvlc_media_player_t *mp,
@@ -1272,6 +1276,8 @@ void libvlc_audio_set_format_callbacks( libvlc_media_player_t *mp,
{
var_SetAddress( mp, "amem-setup", setup );
var_SetAddress( mp, "amem-cleanup", cleanup );
+
+ vlc_player_aout_Reset( mp->player );
}
void libvlc_audio_set_format( libvlc_media_player_t *mp, const char *format,
@@ -1280,6 +1286,8 @@ void libvlc_audio_set_format( libvlc_media_player_t *mp, const char *format,
var_SetString( mp, "amem-format", format );
var_SetInteger( mp, "amem-rate", rate );
var_SetInteger( mp, "amem-channels", channels );
+
+ vlc_player_aout_Reset( mp->player );
}
--
2.27.0
More information about the vlc-devel
mailing list