Re: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: fix hw_device_ctx leak

2021-12-03 Thread Thomas Guillem
On Fri, Dec 3, 2021, at 09:52, Anton Khirnov wrote: > Quoting Thomas Guillem (2021-12-02 20:44:33) >> >> On Thu, Dec 2, 2021, at 15:05, Andreas Rheinhardt wrote: >> > 1. hw_device_ctx is in the public AVCodecContext, not in the private >> > AVCodecInternal. >> > 2. ctx->internal is intended to

Re: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: fix hw_device_ctx leak

2021-12-03 Thread Anton Khirnov
Quoting Thomas Guillem (2021-12-02 20:44:33) > > On Thu, Dec 2, 2021, at 15:05, Andreas Rheinhardt wrote: > > 1. hw_device_ctx is in the public AVCodecContext, not in the private > > AVCodecInternal. > > 2. ctx->internal is intended to be allocated for all the internal > > AVCodecContexts; the che

Re: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: fix hw_device_ctx leak

2021-12-02 Thread Thomas Guillem
On Thu, Dec 2, 2021, at 15:05, Andreas Rheinhardt wrote: > 1. hw_device_ctx is in the public AVCodecContext, not in the private > AVCodecInternal. > 2. ctx->internal is intended to be allocated for all the internal > AVCodecContexts; the check is only there to ensure that we don't crash > if an a

Re: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: fix hw_device_ctx leak

2021-12-02 Thread Andreas Rheinhardt
Thomas Guillem: > > > On Thu, Dec 2, 2021, at 14:38, Andreas Rheinhardt wrote: >> Thomas Guillem: >>> Reproduced when using the VAAPI va module on VLC 4.0. No leaks when >>> setting thread count to 1. >>> --- >>> libavcodec/pthread_frame.c | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff -

Re: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: fix hw_device_ctx leak

2021-12-02 Thread Thomas Guillem
On Thu, Dec 2, 2021, at 14:38, Andreas Rheinhardt wrote: > Thomas Guillem: >> Reproduced when using the VAAPI va module on VLC 4.0. No leaks when >> setting thread count to 1. >> --- >> libavcodec/pthread_frame.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/libavcodec/pthread_fr

Re: [FFmpeg-devel] [PATCH] avcodec/pthread_frame: fix hw_device_ctx leak

2021-12-02 Thread Andreas Rheinhardt
Thomas Guillem: > Reproduced when using the VAAPI va module on VLC 4.0. No leaks when > setting thread count to 1. > --- > libavcodec/pthread_frame.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c > index 73b1b7d7d9..4c578aa44a 100

[FFmpeg-devel] [PATCH] avcodec/pthread_frame: fix hw_device_ctx leak

2021-12-02 Thread Thomas Guillem
Reproduced when using the VAAPI va module on VLC 4.0. No leaks when setting thread count to 1. --- libavcodec/pthread_frame.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 73b1b7d7d9..4c578aa44a 100644 --- a/libavcodec/pthread_fra