[FFmpeg-cvslog] ffplay: do not wait for the picture allocation to finish on exit

Marton Balint git at videolan.org
Sun Dec 29 16:50:27 CET 2013


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sun Dec 29 03:52:09 2013 +0100| [ac7b4bfdeb6af11348f15d4a308fcbe61e68b58b] | committer: 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: Carl Eugen Hoyos <cehoyos at ag.or.at>
Signed-off-by: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac7b4bfdeb6af11348f15d4a308fcbe61e68b58b
---

 ffplay.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffplay.c b/ffplay.c
index fa3e114..164872a 100644
--- 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);
             }
         }



More information about the ffmpeg-cvslog mailing list