[MPlayer-cvslog] r31717 - trunk/libao2/ao_coreaudio.c

adrian subversion at mplayerhq.hu
Sun Jul 11 23:14:48 CEST 2010


Author: adrian
Date: Sun Jul 11 23:14:48 2010
New Revision: 31717

Log:
Process the CoreFoundation runloop in ao_coreaudio in case it's not being processed in the vo, e.g. when vo_corevideo is used with shared_buffer.

Modified:
   trunk/libao2/ao_coreaudio.c

Modified: trunk/libao2/ao_coreaudio.c
==============================================================================
--- trunk/libao2/ao_coreaudio.c	Sun Jul 11 23:12:20 2010	(r31716)
+++ trunk/libao2/ao_coreaudio.c	Sun Jul 11 23:14:48 2010	(r31717)
@@ -1025,6 +1025,7 @@ static OSStatus RenderCallbackSPDIF( Aud
 static int play(void* output_samples,int num_bytes,int flags)
 {
     int wrote, b_digital;
+    SInt32 exit_reason;
 
     // Check whether we need to reset the digital output stream.
     if (ao->b_digital && ao->b_stream_format_changed)
@@ -1052,6 +1053,11 @@ static int play(void* output_samples,int
 
     wrote=write_buffer(output_samples, num_bytes);
     audio_resume();
+
+    do {
+        exit_reason = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.01, true);
+    } while (exit_reason == kCFRunLoopRunHandledSource);
+
     return wrote;
 }
 


More information about the MPlayer-cvslog mailing list