[FFmpeg-cvslog] pthread: prevent updating AVCodecContext from itself in frame_thread_free

Ronald S. Bultje git at videolan.org
Sun Oct 16 04:20:38 CEST 2011


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Fri Oct 14 23:47:45 2011 +0200| [7b6883898ff9000b9a9e71fc1fb6e842ec850a79] | committer: Janne Grunau

pthread: prevent updating AVCodecContext from itself in frame_thread_free

Signed-off-by: Janne Grunau <janne-libav at jannau.net>

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

 libavcodec/pthread.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 94df4ec..42f4382 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;



More information about the ffmpeg-cvslog mailing list