This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 7a1c3ae522e770552b501021d66df20fbaeacb84
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Mon Oct 12 15:46:04 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Mon Oct 12 21:18:53 2026 +0000

    avcodec/pthread_frame: fail the initialization when the first worker cannot 
be copied back
    
    A failed channel layout copy left the user context with a custom order
    and no channel map, the following workers were then set up from it.
    
    This is hardening, the failure was not replicated.
    Found during the review of the fix for l08oZE4M5Rmz
---
 libavcodec/pthread_frame.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 085aff5508..8e88dda2ce 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -890,8 +890,11 @@ static av_cold int init_thread(PerThreadContext *p, int 
*threads_to_free,
     }
     p->thread_init = NEEDS_CLOSE;
 
-    if (first)
-        update_context_from_thread(avctx, copy, 1);
+    if (first) {
+        err = update_context_from_thread(avctx, copy, 1);
+        if (err < 0)
+            return err;
+    }
 
     const AVCodecContext *src = first ? copy : avctx;
     AVCodecContext       *dst = first ? avctx : copy;

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to