Commit ac7b4bfd authored by Marton Balint's avatar Marton Balint

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: 's avatarCarl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent e90aef91
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment