On 4/27/2025 3:52 PM, Andreas Rheinhardt wrote:
James Almer:
side_data_pref_mask is set during ff_decode_preinit() and then never copied to
worker threads. As such, any decoder calling one of the side data helpers that
rely on side_data_pref() in frame threaded scenarios will ignore the user set
list of side data types.

Signed-off-by: James Almer <jamr...@gmail.com>
---
  libavcodec/decode.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index c2b2dd6e3b..20e99b3ffb 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -2209,6 +2209,7 @@ void ff_decode_internal_sync(AVCodecContext *dst, const 
AVCodecContext *src)
      const DecodeContext *src_dc = decode_ctx(src->internal);
      DecodeContext *dst_dc = decode_ctx(dst->internal);
+ dst_dc->side_data_pref_mask = src_dc->side_data_pref_mask;
      av_refstruct_replace(&dst_dc->lcevc, src_dc->lcevc);
  }

Why is this done for every frame, even though it does not change after
preinit?

I think the ff_decode_internal_sync() call in update_context_from_thread() from pthread_frame.c could be removed?

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to