diff options
author | adrian <adrian@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-07-11 21:14:48 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:14:44 +0200 |
commit | 4505a8f06ac7f7b11fe0a1478f6ccfb9b3d559c2 (patch) | |
tree | f78d1b947837c978a6227e2e5535e04ad0213913 | |
parent | 2d35ff8332ba6d58005c1a6c46f9f8c297218dda (diff) | |
download | mpv-4505a8f06ac7f7b11fe0a1478f6ccfb9b3d559c2.tar.bz2 mpv-4505a8f06ac7f7b11fe0a1478f6ccfb9b3d559c2.tar.xz |
ao_coreaudio: Process the CoreFoundation runloop
Process it in case the vo doesn't do that, e.g. when vo_corevideo is
used with shared_buffer.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31717 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libao2/ao_coreaudio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libao2/ao_coreaudio.c b/libao2/ao_coreaudio.c index e3ed62136c..7ceaff6646 100644 --- a/libao2/ao_coreaudio.c +++ b/libao2/ao_coreaudio.c @@ -1025,6 +1025,7 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice, 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 num_bytes,int flags) wrote=write_buffer(output_samples, num_bytes); audio_resume(); + + do { + exit_reason = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.01, true); + } while (exit_reason == kCFRunLoopRunHandledSource); + return wrote; } |