[FFmpeg-cvslog] Make sure the first q press doesnt f*ck up the protocols and thus written files .

Michael Niedermayer git
Mon Mar 7 18:58:12 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Mar  7 17:25:38 2011 +0100| [8993b5969ad1106df28f1128ed2fb2a18ba39989] | committer: Michael Niedermayer

Make sure the first q press doesnt f*ck up the protocols and thus written files.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 ffmpeg.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 445b57b..922aadc 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -509,7 +509,8 @@ static int read_key(void)
 
 static int decode_interrupt_cb(void)
 {
-    return q_pressed || (q_pressed = read_key() == 'q');
+    q_pressed += read_key() == 'q';
+    return q_pressed > 1;
 }
 
 static int ffmpeg_exit(int ret)




More information about the ffmpeg-cvslog mailing list