ffplay: add pause audio feature in the middle of a packet
authorMarton Balint <cus@passwd.hu>
Mon, 28 May 2012 19:42:52 +0000 (21:42 +0200)
committerMarton Balint <cus@passwd.hu>
Tue, 29 May 2012 20:41:50 +0000 (22:41 +0200)
Fixes ticket 215.

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay.c

index 708dab8..44ae931 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -2077,6 +2077,9 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
             } else
                 avcodec_get_frame_defaults(is->frame);
 
+            if (is->paused)
+                return -1;
+
             if (flush_complete)
                 break;
             new_packet = 0;