summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-10-14 23:47:45 +0200
committerJanne Grunau <janne-libav@jannau.net>2011-10-15 00:13:21 +0200
commit7b6883898ff9000b9a9e71fc1fb6e842ec850a79 (patch)
tree291fbffdc9bc8fb5dd3e0202f81274a9dab3bae6 /libavcodec
parentfeadcd1bdcbb4601f4ff01878027264fde985ee1 (diff)
pthread: prevent updating AVCodecContext from itself in frame_thread_free
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 94df4ec5a2..42f4382e7d 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -633,7 +633,7 @@ static void frame_thread_free(AVCodecContext *avctx, int thread_count)
park_frame_worker_threads(fctx, thread_count);
- if (fctx->prev_thread)
+ if (fctx->prev_thread && fctx->prev_thread != fctx->threads)
update_context_from_thread(fctx->threads->avctx, fctx->prev_thread->avctx, 0);
fctx->die = 1;