From 83a8b3002f3399c52b3900ca2f068d51e97713ec Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Thu, 2 Jun 2011 14:24:58 -0700 Subject: mpegvideoenc: fix multislice fate tests with threading disabled. The MPEG encoding code assumes that n_threads == n_slices, and thus it should use n_slices even if threading itself is disabled. --- libavcodec/mpegvideo_enc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/mpegvideo_enc.c') diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 237ea64790..b5a1872eb1 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1226,7 +1226,7 @@ int MPV_encode_picture(AVCodecContext *avctx, { MpegEncContext *s = avctx->priv_data; AVFrame *pic_arg = data; - int i, stuffing_count, context_count = avctx->active_thread_type&FF_THREAD_SLICE ? avctx->thread_count : 1; + int i, stuffing_count, context_count = avctx->thread_count; for(i=0; ithread_context[i]->start_mb_y; @@ -2759,7 +2759,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) { int i; int bits; - int context_count = (s->avctx->active_thread_type & FF_THREAD_SLICE) ? s->avctx->thread_count : 1; + int context_count = s->avctx->thread_count; s->picture_number = picture_number; -- cgit v1.2.3