Mercurial > mplayer.hg
changeset 31651:1b5102a113e0
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.
author | adrian |
---|---|
date | Sun, 11 Jul 2010 21:14:48 +0000 |
parents | 955cdbd3ac02 |
children | c49231cc0f95 |
files | libao2/ao_coreaudio.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/ao_coreaudio.c Sun Jul 11 21:12:20 2010 +0000 +++ b/libao2/ao_coreaudio.c Sun Jul 11 21:14:48 2010 +0000 @@ -1025,6 +1025,7 @@ 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 @@ wrote=write_buffer(output_samples, num_bytes); audio_resume(); + + do { + exit_reason = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.01, true); + } while (exit_reason == kCFRunLoopRunHandledSource); + return wrote; }