Commit f403a1da02 for ffmpeg

commit f403a1da028a0c02985f69db3033a7097c3c8f2c
Author: Sean McGovern <gseanmcg@gmail.com>
Date:   Thu Oct 8 04:57:27 2026 -0400

    avcodec/jpeg2000dec: remove redundant ff_thread_finish_setup() call

    The decoder does not implement update_thread_context, so the frame worker
    already calls ff_thread_finish_setup() before entering the decoder. The
    additional call in jpeg2000_decode_frame() emits duplicate-setup warnings
    and repeats threading-state writes after setup has been published.

    Rely on the frame worker's setup notification instead. A decoder-local
    flag cannot track the notification made by the generic worker.

    Verified with the JPEG 2000 FATE tests using one thread, two frame threads,
    and two slice threads. Decoding p0_01.j2k and chiens_dcinema2K.mxf with two
    frame threads no longer emits the duplicate-call warning and produces
    identical framecrc output.

    Assisted-by: Fairy

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 870678f0b0..9282f7610e 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -2917,8 +2917,6 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, AVFrame *picture,
         if (++x == s->ncomponents)
             picture->flags |= AV_FRAME_FLAG_LOSSLESS;

-    ff_thread_finish_setup(avctx);
-
     avctx->execute2(avctx, jpeg2000_decode_tile, picture, NULL,
                     s->numXtiles * s->numYtiles);