---
 avconv.c |    8 +-------
 avplay.c |    7 +------
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/avconv.c b/avconv.c
index 74120c8..bf8d79e 100644
--- a/avconv.c
+++ b/avconv.c
@@ -481,6 +481,7 @@ sigterm_handler(int sig)
 {
     received_sigterm = sig;
     received_nb_signals++;
+    avio_interrupt_mark_all();
     term_exit();
 }
 
@@ -493,11 +494,6 @@ static void term_init(void)
 #endif
 }
 
-static int decode_interrupt_cb(void)
-{
-    return received_nb_signals > 1;
-}
-
 void exit_program(int ret)
 {
     int i;
@@ -4033,8 +4029,6 @@ int main(int argc, char **argv)
 #endif
     av_register_all();
 
-    avio_set_interrupt_cb(decode_interrupt_cb);
-
     show_banner();
 
     /* parse options */
diff --git a/avplay.c b/avplay.c
index 198dce1..9151059 100644
--- a/avplay.c
+++ b/avplay.c
@@ -355,6 +355,7 @@ static void packet_queue_abort(PacketQueue *q)
     SDL_LockMutex(q->mutex);
 
     q->abort_request = 1;
+    avio_interrupt_mark_all();
 
     SDL_CondSignal(q->cond);
 
@@ -2319,11 +2320,6 @@ static void stream_component_close(VideoState *is, int 
stream_index)
    variable instead of a thread local variable */
 static VideoState *global_video_state;
 
-static int decode_interrupt_cb(void)
-{
-    return (global_video_state && global_video_state->abort_request);
-}
-
 /* this thread gets the stream from the disk or the network */
 static int decode_thread(void *arg)
 {
@@ -2344,7 +2340,6 @@ static int decode_thread(void *arg)
     is->subtitle_stream = -1;
 
     global_video_state = is;
-    avio_set_interrupt_cb(decode_interrupt_cb);
 
     err = avformat_open_input(&ic, is->filename, is->iformat, &format_opts);
     if (err < 0) {
-- 
1.7.4.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to