[FFmpeg-cvslog] ffmpeg: stop protocols on interrupt when no transcoding has happened yet

Michael Niedermayer git at videolan.org
Thu Apr 10 22:37:03 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Apr 10 22:23:54 2014 +0200| [517cc81e939fce89c265e8edfef06e44cc362b73] | committer: Michael Niedermayer

ffmpeg: stop protocols on interrupt when no transcoding has happened yet

Fixes Ticket3344

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 ffmpeg.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 2850746..051e279 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -316,6 +316,7 @@ void term_exit(void)
 
 static volatile int received_sigterm = 0;
 static volatile int received_nb_signals = 0;
+static volatile int transcode_init_done = 0;
 static int main_return_code = 0;
 
 static void
@@ -422,7 +423,7 @@ static int read_key(void)
 
 static int decode_interrupt_cb(void *ctx)
 {
-    return received_nb_signals > 1;
+    return received_nb_signals > transcode_init_done;
 }
 
 const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL };
@@ -2889,6 +2890,8 @@ static int transcode_init(void)
         print_sdp();
     }
 
+    transcode_init_done = 1;
+
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list