[vlc-commits] lib: media_player: fix aout callbacks having no effects

Thomas Guillem git at videolan.org
Fri Jul 24 09:16:23 CEST 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul 22 15:48:42 2020 +0200| [850c708678992a21c6111abb9c79135a4dc618cd] | committer: Thomas Guillem

lib: media_player: fix aout callbacks having no effects

The main aout need to be reset after changing aout callbacks variables.

Regression from c0c35a50025df54cee95ddb00b325438b1f47e5e

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=850c708678992a21c6111abb9c79135a4dc618cd
---

 lib/media_player.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/media_player.c b/lib/media_player.c
index b00984753e..6ec6025022 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 );
 }
 
 



More information about the vlc-commits mailing list