[vlc-devel] [PATCH] vt_utils: Fix memory leak due to excess retain of CVPixelBuffer
Thomas Guillem
thomas at gllm.fr
Tue Sep 12 09:32:55 CEST 2017
Good catch, I'll merge it, thanks!
On Mon, Sep 11, 2017, at 23:55, Marvin Scholz wrote:
> cvpxpic_attach already retains the CVPixelBufferRef, so retaining it
> before calling this function is not necessary.
>
> Fix #18767
> ---
> modules/codec/vt_utils.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/codec/vt_utils.c b/modules/codec/vt_utils.c
> index 3faf8598dd..02290fba51 100644
> --- a/modules/codec/vt_utils.c
> +++ b/modules/codec/vt_utils.c
> @@ -185,7 +185,7 @@ cvpxpic_unmap(picture_t *mapped_pic)
> return NULL;
> }
>
> - cvpxpic_attach(hw_pic, CVPixelBufferRetain((void
> *)mapped_pic->p_sys));
> + cvpxpic_attach(hw_pic, (void *)mapped_pic->p_sys);
> picture_CopyProperties(hw_pic, mapped_pic);
> picture_Release(mapped_pic);
> return hw_pic;
> --
> 2.11.0 (Apple Git-81)
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list