Commit 03cd785195 for ffmpeg

commit 03cd7851955c023f1ff4c8a495d47e996d01485a
Author: Michael Niedermayer <michael@niedermayer.cc>
Date:   Sat Oct 17 03:18:25 2026 +0200

    avcodec/nvdec: forget the previous picture's bitstream pointer when a picture starts

    Fixes: I8tidri5usIx
    Fixes: AISLE-2026-0150-00880
    Fixes: use after free
    Use after free Replicated through UnModified FFmpeg with ASAN

    Found-by: Joshua Rogers (AISLE)

diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c
index 3f5c7ea122..d928e3c7a1 100644
--- a/libavcodec/nvdec.c
+++ b/libavcodec/nvdec.c
@@ -972,6 +972,7 @@ int ff_nvdec_start_frame(AVCodecContext *avctx, AVFrame *frame)
     NVDECFrame *cf = NULL;
     int ret;

+    ctx->bitstream     = NULL;
     ctx->bitstream_len = 0;
     ctx->nb_slices     = 0;