]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/frame_thread_encoder: check for frame threading codec cap instead of intra...
authorJames Almer <jamrial@gmail.com>
Mon, 18 May 2020 13:50:06 +0000 (10:50 -0300)
committerJames Almer <jamrial@gmail.com>
Mon, 18 May 2020 15:39:34 +0000 (12:39 -0300)
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>
libavcodec/frame_thread_encoder.c

index 949bc69f81d216530abb2de82cf76ec42e15f5c1..bb4b5d73413bd8c98e35fcb7d723da7b839831cd 100644 (file)
@@ -120,7 +120,7 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){
 
 
     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;
 
     if(   !avctx->thread_count