[FFmpeg-cvslog] avformat/async: wake up main thread before exit background thread

Zhang Rui git at videolan.org
Sat Jul 25 02:42:31 CEST 2015


ffmpeg | branch: master | Zhang Rui <bbcallen at gmail.com> | Wed Jul 22 02:47:26 2015 +0800| [8a173351895e29e842e3a299b0366faac80aff9a] | committer: Michael Niedermayer

avformat/async: wake up main thread before exit background thread

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavformat/async.c b/libavformat/async.c
index 0bcc3ae..60ea14c 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;
         }



More information about the ffmpeg-cvslog mailing list