avcodec/frame_thread_encoder: check for frame threading codec cap instead of intra only

It's the correct dedicated capability reported by supported encoders.
Otherwise, the frame thread path will be used for unsupported encoders
like r210 for no gain.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: James Almer <jamrial@gmail.com>
pull/338/head
James Almer 5 years ago
parent 49220869a8
commit 6275a7ec73
  1. 2
      libavcodec/frame_thread_encoder.c

@ -120,7 +120,7 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){
if( !(avctx->thread_type & FF_THREAD_FRAME) if( !(avctx->thread_type & FF_THREAD_FRAME)
|| !(avctx->codec->capabilities & AV_CODEC_CAP_INTRA_ONLY)) || !(avctx->codec->capabilities & AV_CODEC_CAP_FRAME_THREADS))
return 0; return 0;
if( !avctx->thread_count if( !avctx->thread_count

Loading…
Cancel
Save