diff options
author | Marton Balint <cus@passwd.hu> | 2012-09-16 19:00:51 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2012-09-16 19:07:28 +0200 |
commit | d8f8e911bd5efbd02dd34e9c5097df6828f4c603 (patch) | |
tree | 432ebe7843718d7f98d233a3ee7df29914a5a827 /ffplay.c | |
parent | 094991eb69011b647bd3ec0c50c4c7ed14b2a1bf (diff) | |
download | ffmpeg-d8f8e911bd5efbd02dd34e9c5097df6828f4c603.tar.gz |
ffplay: dont wait 100ms if data is not yet ready
Also signal the wait if audio buffer is empty. This fixes jerky audio with
realtime sources.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2586,7 +2586,9 @@ static int read_thread(void *arg) eof = 1; if (ic->pb && ic->pb->error) break; - SDL_Delay(100); /* wait for user event */ + SDL_LockMutex(wait_mutex); + SDL_CondWaitTimeout(is->continue_read_thread, wait_mutex, 10); + SDL_UnlockMutex(wait_mutex); continue; } /* check if packet is in play range specified by user, then queue, otherwise discard */ |