From a15d2fdfd96c0ce711e0be3fe6c2f47b5a39b931 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 9 Sep 2024 20:14:15 -0500 Subject: [PATCH] avcodec/amfenc: Fix AV1 HDR metadata for delayed surfaces AMF_VIDEO_ENCODER_AV1_INPUT_HDR_METADATA was set above in the normal input case but forgotten for the same in the delayed surface codepath. Signed-off-by: Cameron Gutman Signed-off-by: Dmitrii Ovchinnikov --- libavcodec/amfenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c index 41eaef9758..a47aea6108 100644 --- a/libavcodec/amfenc.c +++ b/libavcodec/amfenc.c @@ -832,6 +832,8 @@ int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt) AMF_ASSIGN_PROPERTY_INTERFACE(res, ctx->encoder, AMF_VIDEO_ENCODER_INPUT_HDR_METADATA, hdrmeta_buffer); break; case AV_CODEC_ID_HEVC: AMF_ASSIGN_PROPERTY_INTERFACE(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_INPUT_HDR_METADATA, hdrmeta_buffer); break; + case AV_CODEC_ID_AV1: + AMF_ASSIGN_PROPERTY_INTERFACE(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_INPUT_HDR_METADATA, hdrmeta_buffer); break; } hdrmeta_buffer->pVtbl->Release(hdrmeta_buffer); }