Use consistent condition for whether to run slice-threading execute function.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 2 Apr 2011 00:24:46 +0000 (20:24 -0400)
committerRonald S. Bultje <rsbultje@gmail.com>
Sat, 9 Apr 2011 12:23:22 +0000 (08:23 -0400)
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavcodec/mpeg12.c

index 06aa8ab..3e9f74a 100644 (file)
@@ -2301,7 +2301,7 @@ static int decode_chunks(AVCodecContext *avctx,
             break;
 
         case PICTURE_START_CODE:
-            if (avctx->thread_count > 1 && s->slice_count) {
+            if (HAVE_THREADS && (avctx->active_thread_type&FF_THREAD_SLICE) && s->slice_count) {
                 int i;
 
                 avctx->execute(avctx, slice_decode_thread,