[vlc-commits] auhal: fill size variables correctly for AudioObjectGetPropertyData

David Fuhrmann git at videolan.org
Thu Sep 12 21:56:22 CEST 2013


vlc/vlc-2.1 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Thu Sep 12 21:45:12 2013 +0200| [78d382c19db21e000ab69439e8467df5d9c1a9af] | committer: David Fuhrmann

auhal: fill size variables correctly for AudioObjectGetPropertyData
(cherry picked from commit ae871faa280033ebb8a7ecd893c369d9a5894bc8)

Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>

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

 modules/audio_output/auhal.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index b7e036a..2e480db 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -330,7 +330,7 @@ static int Start(audio_output_t *p_aout, audio_sample_format_t *restrict fmt)
         p_sys->b_selected_dev_is_default = true;
 
         AudioObjectID defaultDeviceID = 0;
-        UInt32 propertySize = 0;
+        UInt32 propertySize = sizeof(AudioObjectID);
         AudioObjectPropertyAddress defaultDeviceAddress = { kAudioHardwarePropertyDefaultOutputDevice, kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster };
         propertySize = sizeof(AudioObjectID);
         err = AudioObjectGetPropertyData(kAudioObjectSystemObject, &defaultDeviceAddress, 0, NULL, &propertySize, &defaultDeviceID);
@@ -1063,6 +1063,7 @@ static void Stop(audio_output_t *p_aout)
         if (p_sys->b_changed_mixing && p_sys->sfmt_revert.mFormatID != kAudioFormat60958AC3) {
             int b_mix;
             Boolean b_writeable = false;
+            i_param_size = sizeof(int);
             /* Revert mixable to true if we are allowed to */
             AudioObjectPropertyAddress audioDeviceSupportsMixingAddress = { kAudioDevicePropertySupportsMixing , kAudioDevicePropertyScopeOutput, kAudioObjectPropertyElementMaster };
             err = AudioObjectIsPropertySettable(p_sys->i_selected_dev, &audioDeviceSupportsMixingAddress, &b_writeable);



More information about the vlc-commits mailing list