diff mbox series

[FFmpeg-devel] Fixed nvenc release dump

Message ID PAXPR10MB510308EA2779D5FEADEA420DEAB8A@PAXPR10MB5103.EURPRD10.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel] Fixed nvenc release dump | expand

Checks

Context Check Description
andriy/commit_msg_x86 warning The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

GOOR, Jean-Noel Nov. 24, 2023, 7:04 a.m. UTC
Signed-off-by: GOOR, Jean-Noël <jn.goor@evs.com>
---
 libavcodec/nvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.37.3.windows.1



Jean-Noël GOOR - Senior Software Architect
T. +32 4 361.58.70 jn.goor@evs.com 

EVS Broadcast Equipment - Rue Bois Saint Jean, 13 - 4102 Seraing - BELGIUM



EVS Broadcast Equipment is a commercial name which is used for all legal entities of our group. 
At EVS we give utmost importance to your data's privacy. If you wish to know more on how we manage your data and on your rights, please consult our Privacy Statement. 
This message may contain confidential information and is intended solely for the use of the addressee. Please do not use or publish the contained information without the agreement of the sender. If you are not the intended recipient of this message, please notify the sender and do not disclose, use, disseminate or copy this message.
Please consider the environment before printing this email.

Comments

Timo Rothenpieler Nov. 24, 2023, 12:38 p.m. UTC | #1
I don't quite understand the commit message.
It should start with "avcodec/nvenc:" and then state what it's changing 
and why.

On 24/11/2023 08:04, GOOR, Jean-Noel wrote:
> Signed-off-by: GOOR, Jean-Noël <jn.goor@evs.com>
> ---
>   libavcodec/nvenc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
> index 3c68ed3930..1f8c7e8c0e 100644
> --- a/libavcodec/nvenc.c
> +++ b/libavcodec/nvenc.c
> @@ -1860,7 +1860,7 @@ av_cold int ff_nvenc_encode_close(AVCodecContext *avctx)
>       av_fifo_freep2(&ctx->unused_surface_queue);
>   
>       if (ctx->frame_data_array) {
> -        for (i = 0; i < ctx->nb_surfaces; i++)
> +       for (i = 0; i < ctx->frame_data_array_nb; i++)

Wrong indentation.

The change itself looks correct to me on first glance.
Did you find this via a leak checker?

>               av_buffer_unref(&ctx->frame_data_array[i].frame_opaque_ref);
>           av_freep(&ctx->frame_data_array);
>       }
diff mbox series

Patch

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 3c68ed3930..1f8c7e8c0e 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1860,7 +1860,7 @@  av_cold int ff_nvenc_encode_close(AVCodecContext *avctx)
     av_fifo_freep2(&ctx->unused_surface_queue);
 
     if (ctx->frame_data_array) {
-        for (i = 0; i < ctx->nb_surfaces; i++)
+       for (i = 0; i < ctx->frame_data_array_nb; i++)
             av_buffer_unref(&ctx->frame_data_array[i].frame_opaque_ref);
         av_freep(&ctx->frame_data_array);
     }