[vlc-commits] [Git][videolan/vlc][master] 2 commits: winstore: remove useless NULL assignation

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Sep 27 10:57:11 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
328635ea by Thomas Guillem at 2022-09-27T10:45:35+00:00
winstore: remove useless NULL assignation

It is asserted just before (and the assert is right)

- - - - -
7036c75d by Thomas Guillem at 2022-09-27T10:45:35+00:00
winstore: fix memleak if device failed

- - - - -


1 changed file:

- modules/audio_output/winstore.c


Changes:

=====================================
modules/audio_output/winstore.c
=====================================
@@ -133,7 +133,6 @@ static void WaitForAudioClient(audio_output_t *aout)
     assert(sys->refs == 0);
     sys->refs = 0;
     assert(sys->client == NULL);
-    sys->client = NULL;
     free(sys->acquired_device);
     sys->acquired_device = NULL;
     ActivateAudioInterfaceAsync(devId, &IID_IAudioClient, NULL, &sys->client_locator, &asyncOp);
@@ -371,7 +370,10 @@ static void Play(audio_output_t *aout, block_t *block, vlc_tick_t date)
 {
     aout_sys_t *sys = aout->sys;
     if( unlikely( sys->client == NULL ) )
+    {
+        block_Release(block);
         return;
+    }
 
     EnterMTA();
     HRESULT hr = aout_stream_Play(sys->stream, block, date);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/dc1dea6ddd9e11fc25b2bd1c5da74afa04e23f65...7036c75d721ce9259a37486d525104c61bb01bea

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/dc1dea6ddd9e11fc25b2bd1c5da74afa04e23f65...7036c75d721ce9259a37486d525104c61bb01bea
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list