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

David Fuhrmann git at videolan.org
Thu Sep 12 21:50:03 CEST 2013


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

auhal: fill size variables correctly for AudioObjectGetPropertyData

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

 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 c5de559..073adc9 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);
@@ -1062,6 +1062,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