[FFmpeg-cvslog] avcodec/nvdec: reset bitstream_len/nb_slices when resetting bitstream pointer

Timo Rothenpieler git at videolan.org
Sat Mar 30 01:27:53 EET 2024


ffmpeg | branch: release/4.3 | Timo Rothenpieler <timo at rothenpieler.org> | Sat Mar 30 00:12:03 2024 +0100| [fa9a0e7f3e83beecbf031bebd51f1b3ac0f568af] | committer: Timo Rothenpieler

avcodec/nvdec: reset bitstream_len/nb_slices when resetting bitstream pointer

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fa9a0e7f3e83beecbf031bebd51f1b3ac0f568af
---

 libavcodec/nvdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c
index 6168a7e3f1..6d7e712580 100644
--- a/libavcodec/nvdec.c
+++ b/libavcodec/nvdec.c
@@ -624,6 +624,8 @@ int ff_nvdec_simple_end_frame(AVCodecContext *avctx)
     NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
     int ret = ff_nvdec_end_frame(avctx);
     ctx->bitstream = NULL;
+    ctx->bitstream_len = 0;
+    ctx->nb_slices = 0;
     return ret;
 }
 



More information about the ffmpeg-cvslog mailing list