[FFmpeg-cvslog] pthreads: reset active_thread_type when slice thread_init returrns early

Janne Grunau git at videolan.org
Fri Dec 23 03:37:59 CET 2011


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Wed Dec 21 13:07:54 2011 +0100| [f77f640b3035d357a6c6ffcea243c7ea0d8ebc67] | committer: Janne Grunau

pthreads: reset active_thread_type when slice thread_init returrns early

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

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

diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 7e03c64..ac15fef 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -237,8 +237,10 @@ static int thread_init(AVCodecContext *avctx)
     ThreadContext *c;
     int thread_count = avctx->thread_count;
 
-    if (thread_count <= 1)
+    if (thread_count <= 1) {
+        avctx->active_thread_type = 0;
         return 0;
+    }
 
     c = av_mallocz(sizeof(ThreadContext));
     if (!c)



More information about the ffmpeg-cvslog mailing list