summaryrefslogtreecommitdiff
path: root/libavformat/async.c
diff options
context:
space:
mode:
authorZhang Rui <bbcallen@gmail.com>2015-07-22 02:47:26 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-25 02:26:01 +0200
commit8a173351895e29e842e3a299b0366faac80aff9a (patch)
tree57b4e23a8ca8f5306f5c1a4e1c1ef5da604b7776 /libavformat/async.c
parentc0a4af408ee56e38aed32dc75749014e21261b13 (diff)
downloadffmpeg-8a173351895e29e842e3a299b0366faac80aff9a.tar.gz
avformat/async: wake up main thread before exit background thread
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/async.c')
-rw-r--r--libavformat/async.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/async.c b/libavformat/async.c
index 0bcc3ae711..60ea14c9e0 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;
}