[vlc-commits] libvlc_audio_output_set: really force the requested output

Rémi Denis-Courmont git at videolan.org
Sun Jul 10 19:20:51 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 10 20:20:35 2011 +0300| [44c25d29f48f433f90e3d9d46a48c3bb97ba2716] | committer: Rémi Denis-Courmont

libvlc_audio_output_set: really force the requested output

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

 src/control/audio.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/control/audio.c b/src/control/audio.c
index d39de60..e6dc256 100644
--- a/src/control/audio.c
+++ b/src/control/audio.c
@@ -133,9 +133,13 @@ void libvlc_audio_output_list_release( libvlc_audio_output_t *p_list )
  ***********************/
 int libvlc_audio_output_set( libvlc_media_player_t *mp, const char *psz_name )
 {
-    if( !module_exists( psz_name ) )
+    char *value;
+
+    if( !module_exists( psz_name )
+     || asprintf( &value, "%s,none", psz_name ) == -1 )
         return -1;
-    var_SetString( mp, "aout", psz_name );
+    var_SetString( mp, "aout", value );
+    free( value );
     return 0;
 }
 



More information about the vlc-commits mailing list