Commit 87cdb6cd6a for ffmpeg

commit 87cdb6cd6a8d1ec201cb82b30e64d5f946939e23
Author: Michael Niedermayer <michael@niedermayer.cc>
Date:   Sat Oct 24 05:47:15 2026 +0200

    avcodec/liboapvenc: copy the input with the dimensions of the codec context

    Fixes: out of array write
    Fixes: HwSE6IYkyPvk (AISLE-2026-0150-00139)
    Out of array write Replicated through API with ASAN
    Found-by: Joshua Rogers <joshua.rogers@aisle.com>

diff --git a/libavcodec/liboapvenc.c b/libavcodec/liboapvenc.c
index 32a8cd5f1c..0f59d65e14 100644
--- a/libavcodec/liboapvenc.c
+++ b/libavcodec/liboapvenc.c
@@ -582,7 +582,7 @@ static int liboapve_encode(AVCodecContext *avctx, AVPacket *avpkt,
     int ret;

     av_image_copy2((uint8_t **)imgb->a, imgb->s, frame->data, frame->linesize,
-                   frame->format, frame->width, frame->height);
+                   avctx->pix_fmt, avctx->width, avctx->height);

     imgb->ts[0] = frame->pts;