]> git.sesse.net Git - ffmpeg/commitdiff
ffplay: do not wait for the picture allocation to finish on exit
authorMarton Balint <cus@passwd.hu>
Sun, 29 Dec 2013 02:52:09 +0000 (03:52 +0100)
committerMarton Balint <cus@passwd.hu>
Sun, 29 Dec 2013 12:19:19 +0000 (13:19 +0100)
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>
ffplay.c

index fa3e1141d4a70c2f9d3c0d07e63b4175c0897d8b..164872aaeabf3b2e110ee105cccfba3c9a450f14 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -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);
             }
         }