[FFmpeg-devel] [PATCH 2/6] avcodec/avcodec: Remove redundant check

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat Aug 13 18:03:02 EEST 2022


At this point active_thread_type is set iff active_thread_type
is set to FF_THREAD_FRAME iff AVCodecInternal.frame_thread_encoder
is set.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/avcodec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index 0451f57f82..29643199be 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -283,8 +283,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
     if (ret < 0)
         goto free_and_end;
 
-    if (HAVE_THREADS
-        && !(avci->frame_thread_encoder && (avctx->active_thread_type&FF_THREAD_FRAME))) {
+    if (HAVE_THREADS && !avci->frame_thread_encoder) {
         /* Frame-threaded decoders call FFCodec.init for their child contexts. */
         lock_avcodec(codec2);
         ret = ff_thread_init(avctx);
-- 
2.34.1



More information about the ffmpeg-devel mailing list