[vlc-devel] [PATCH 2/4] libvlc: the string from libvlc_audio_output_get_device() must use libvlc_free()

Steve Lhomme robux4 at ycbcr.xyz
Mon Jun 3 16:02:05 CEST 2019


Since we advertised that free() could be used, to avoid issue we rename the
function.
---
 include/vlc/libvlc_media_player.h | 6 +++---
 lib/audio.c                       | 2 +-
 lib/libvlc.sym                    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index e9b31ab29e..5b6e14ea38 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -2071,10 +2071,10 @@ LIBVLC_API void libvlc_audio_output_device_set( libvlc_media_player_t *mp,
  * \param mp media player
  * \return the current audio output device identifier
  *         NULL if no device is selected or in case of error
- *         (the result must be released with free()).
- * \version LibVLC 3.0.0 or later.
+ *         (the result must be released with libvlc_free()).
+ * \version LibVLC 4.0.0 and later.
  */
-LIBVLC_API char *libvlc_audio_output_device_get( libvlc_media_player_t *mp );
+LIBVLC_API char *libvlc_audio_output_get_device( libvlc_media_player_t *mp );
 
 /**
  * Toggle mute status.
diff --git a/lib/audio.c b/lib/audio.c
index f5e4493138..ddcf6d82e6 100644
--- a/lib/audio.c
+++ b/lib/audio.c
@@ -251,7 +251,7 @@ void libvlc_audio_output_device_set( libvlc_media_player_t *mp,
     aout_Release(aout);
 }
 
-char *libvlc_audio_output_device_get( libvlc_media_player_t *mp )
+char *libvlc_audio_output_get_device( libvlc_media_player_t *mp )
 {
     audio_output_t *aout = GetAOut( mp );
     if( aout == NULL )
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index 547d8010f8..25e27c9f05 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -14,7 +14,7 @@ libvlc_audio_equalizer_new_from_preset
 libvlc_audio_equalizer_release
 libvlc_audio_equalizer_set_amp_at_index
 libvlc_audio_equalizer_set_preamp
-libvlc_audio_output_device_get
+libvlc_audio_output_get_device
 libvlc_audio_output_device_enum
 libvlc_audio_output_device_list_get
 libvlc_audio_output_device_list_release
-- 
2.17.1



More information about the vlc-devel mailing list