[FFmpeg-devel] [PATCH 4/4] avformat/async: wake up main thread before exit background thread

Zhang Rui bbcallen at gmail.com
Tue Jul 21 20:47:26 CEST 2015


---
 libavformat/async.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/async.c b/libavformat/async.c
index 856b4dd..a905f8d 100644
--- a/libavformat/async.c
+++ b/libavformat/async.c
@@ -99,6 +99,7 @@ static void *async_buffer_task(void *arg)
         if (async_check_interrupt(h)) {
             c->io_eof_reached = 1;
             c->io_error       = AVERROR_EXIT;
+            pthread_cond_signal(&c->cond_wakeup_main);
             pthread_mutex_unlock(&c->mutex);
             break;
         }
-- 
2.0.0



More information about the ffmpeg-devel mailing list