[vlc-commits] Revert "auhal: workaround bug (in core audio?) which leads to shortend device names"

Felix Paul Kühne git at videolan.org
Sat Feb 16 20:35:16 CET 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Feb 16 20:22:26 2013 +0100| [cb37cbe2fc9f0c7c32c72e6ab2d1fa571d072da8] | committer: Felix Paul Kühne

Revert "auhal: workaround bug (in core audio?) which leads to shortend device names"

This reverts commit a446ef2826e9d4d2755f32eb27f797d5f3d9c68f.

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

 modules/audio_output/auhal.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index 3aea01c..d45770a 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -990,7 +990,6 @@ static void RebuildDeviceList(audio_output_t * p_aout)
         bool b_digital = false;
         UInt32 i_id = deviceIDs[i];
 
-        propertySize = 0;
         /* Retrieve the length of the device name */
         err = AudioObjectGetPropertyDataSize(deviceIDs[i], &deviceNameAddress, 0, NULL, &propertySize);
         if (err != noErr) {
@@ -998,10 +997,6 @@ static void RebuildDeviceList(audio_output_t * p_aout)
             continue;
         }
 
-        // previous function returns to small buffer len, bug in core audio!?
-        if (propertySize < 100)
-            propertySize = 100;
-
         /* Retrieve the name of the device */
         psz_name = (char *)malloc(propertySize);
         err = AudioObjectGetPropertyData(deviceIDs[i], &deviceNameAddress, 0, NULL, &propertySize, psz_name);
@@ -1023,11 +1018,9 @@ static void RebuildDeviceList(audio_output_t * p_aout)
         if (AudioDeviceSupportsDigital(p_aout, deviceIDs[i])) {
             b_digital = true;
             msg_Dbg(p_aout, "'%s' supports digital output", psz_name);
-            char *psz_encoded_name = nil;
-            asprintf(&psz_encoded_name, _("%s (Encoded Output)"), psz_name);
+            asprintf(&psz_name, _("%s (Encoded Output)"), psz_name);
             i_id = i_id | AOUT_VAR_SPDIF_FLAG;
-            add_device_to_list(p_aout, i_id, psz_encoded_name);
-            free(psz_encoded_name);
+            add_device_to_list(p_aout, i_id, psz_name);
         }
 
         free(psz_name);



More information about the vlc-commits mailing list