On 28.02.2023 16:03, Zhao Zhili wrote:
I can move the check from here to close(). assert is helpful if it can catch
bugs during development. It doesn't help much here since this is a rare case
which doesn't triggered during development.
Crashing with an assertion is still much better than deref
> From: ffmpeg-devel On Behalf Of Timo
> Rothenpieler
> Sent: 2023年2月28日 22:37
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: fix NULL pointer
> dereference
>
> On 28.02.2023 19:43, Zhao Zhili wrote:
> > From: Zhao Zhili
>
On 28.02.2023 19:43, Zhao Zhili wrote:
From: Zhao Zhili
This can happen if encoder init failed before setup the queue, then
reorder_queue_flush() is called by close().
Fix ticket #10221
Signed-off-by: Zhao Zhili
---
libavcodec/nvenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/
Zhao Zhili 于2023年2月28日周二 18:44写道:
>
> From: Zhao Zhili
>
> This can happen if encoder init failed before setup the queue, then
> reorder_queue_flush() is called by close().
>
> Fix ticket #10221
>
> Signed-off-by: Zhao Zhili
> ---
> libavcodec/nvenc.c | 2 ++
> 1 file changed, 2 insertions(+)
>