[vlc-commits] auhal: fix inverted logic (and potential NULL pointer deref).

Rémi Duraffort git at videolan.org
Sat Sep 1 09:25:07 CEST 2012


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Sep  1 09:19:14 2012 +0200| [c79a5875cb679967cd6b5cfc98f00c5a7444c85e] | committer: Rémi Duraffort

auhal: fix inverted logic (and potential NULL pointer deref).

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

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

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index f2b0918..ce00d3a 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -1281,7 +1281,7 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout,
                    AudioConvertHostTimeToNanos( host_time.mHostTime ) / 1000;
                    //- ((mtime_t) 1000000 / p_aout->format.i_rate * 31 ); // 31 = Latency in Frames. retrieve somewhere
 
-    if( ioData == NULL && ioData->mNumberBuffers < 1 )
+    if( ioData == NULL || ioData->mNumberBuffers < 1 )
     {
         msg_Err( p_aout, "no iodata or buffers");
         return 0;



More information about the vlc-commits mailing list