]> git.sesse.net Git - ffmpeg/blobdiff - ffplay.c
Merge remote-tracking branch 'cigaes/master'
[ffmpeg] / ffplay.c
index 0cdcbb4023d8c9120fee1e07f0745ff47e54de90..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);
             }
         }
@@ -1948,7 +1948,6 @@ static int video_thread(void *arg)
                 event.type = FF_QUIT_EVENT;
                 event.user.data1 = is;
                 SDL_PushEvent(&event);
-                av_free_packet(&pkt);
                 goto the_end;
             }
             filt_in  = is->in_video_filter;
@@ -1963,7 +1962,6 @@ static int video_thread(void *arg)
         ret = av_buffersrc_add_frame(filt_in, frame);
         if (ret < 0)
             goto the_end;
-        av_free_packet(&pkt);
 
         while (ret >= 0) {
             is->frame_last_returned_time = av_gettime() / 1000000.0;