This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new c48230eb86 avcodec/pthread_frame: sync decoded side data to all worker
threads
c48230eb86 is described below
commit c48230eb86ff02246f6a14fa1475a0d9398363b4
Author: Kacper Michajłow <[email protected]>
AuthorDate: Sun Aug 2 22:22:58 2026 +0200
Commit: Kacper Michajłow <[email protected]>
CommitDate: Fri Aug 14 12:44:25 2026 +0000
avcodec/pthread_frame: sync decoded side data to all worker threads
Previously only the first thread's context and the user-facing one had
it, so frames decoded by the remaining worker threads were missing
global side data whenever the per-frame state could not provide it, e.g.
extradata-derived HDR metadata after avcodec_flush_buffers().
Signed-off-by: Kacper Michajłow <[email protected]>
---
libavcodec/pthread_frame.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index e6dcc23c15..1814ab2768 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -882,17 +882,18 @@ static av_cold int init_thread(PerThreadContext *p, int
*threads_to_free,
}
p->thread_init = NEEDS_CLOSE;
- if (first) {
+ if (first)
update_context_from_thread(avctx, copy, 1);
- av_frame_side_data_free(&avctx->decoded_side_data,
&avctx->nb_decoded_side_data);
- for (int i = 0; i < copy->nb_decoded_side_data; i++) {
- err = av_frame_side_data_clone(&avctx->decoded_side_data,
- &avctx->nb_decoded_side_data,
- copy->decoded_side_data[i], 0);
- if (err < 0)
- return err;
- }
+ const AVCodecContext *src = first ? copy : avctx;
+ AVCodecContext *dst = first ? avctx : copy;
+ av_frame_side_data_free(&dst->decoded_side_data,
&dst->nb_decoded_side_data);
+ for (int i = 0; i < src->nb_decoded_side_data; i++) {
+ err = av_frame_side_data_clone(&dst->decoded_side_data,
+ &dst->nb_decoded_side_data,
+ src->decoded_side_data[i], 0);
+ if (err < 0)
+ return err;
}
atomic_init(&p->debug_threads, (copy->debug & FF_DEBUG_THREADS) != 0);
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]