diff options
author | Marton Balint <cus@passwd.hu> | 2013-12-29 03:52:09 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2013-12-29 13:19:19 +0100 |
commit | ac7b4bfdeb6af11348f15d4a308fcbe61e68b58b (patch) | |
tree | 72b85883407dd20aaed0376d02fe788b31ef161b /ffplay.c | |
parent | e90aef9195d2081cd1ee4bc1759b5610427c50c8 (diff) | |
download | ffmpeg-ac7b4bfdeb6af11348f15d4a308fcbe61e68b58b.tar.gz |
ffplay: do not wait for the picture allocation to finish on exit
When SDL could not allocate a YUV overlay or open a window, the video thread
got locked up because it waited for the allocation to finish forever.
Reported-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1610,7 +1610,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, double } /* if the queue is aborted, we have to pop the pending ALLOC event or wait for the allocation to complete */ if (is->videoq.abort_request && SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_EVENTMASK(FF_ALLOC_EVENT)) != 1) { - while (!vp->allocated) { + while (!vp->allocated && !is->abort_request) { SDL_CondWait(is->pictq_cond, is->pictq_mutex); } } |