pthread: validate_thread_parameters() ignored slice-threading being intentionally off

The thread_type API allows you to request only FF_THREAD_FRAME (instead of
FRAME | SLICE), but it was being ignored.
We don't implement both of them at the same time, so there isn't an effect
on current codecs, except that you can request no kinds of threading now
(a bit useless).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
oldabi
Alexander Strange 14 years ago committed by Ronald S. Bultje
parent f82163cf1c
commit cf39b461d3
  1. 2
      libavcodec/pthread.c

@ -877,7 +877,7 @@ static void validate_thread_parameters(AVCodecContext *avctx)
avctx->active_thread_type = 0;
} else if (frame_threading_supported && (avctx->thread_type & FF_THREAD_FRAME)) {
avctx->active_thread_type = FF_THREAD_FRAME;
} else {
} else if (avctx->thread_type & FF_THREAD_SLICE) {
avctx->active_thread_type = FF_THREAD_SLICE;
}
}

Loading…
Cancel
Save