[vlc-devel] [RFC 1/2] vdpau: remove hardware context free

Steve Lhomme robux4 at ycbcr.xyz
Thu Dec 20 14:19:38 CET 2018


On 20/12/2018 11:55, Rémi Denis-Courmont wrote:
> It is necessary in some lavc versions. This probably needs a bump in 
> requirements first.

Do you have any idea what version ? It seems that with some version from 
November 2018 the hwctx is still not NULL. And it doesn't crash so I 
assume that's some memory that's allocated somewhere but not freed.

Since it's memory we don't allocate it seems that this is not a bug on 
our side.

>
> Le 20 décembre 2018 11:29:20 GMT+02:00, Steve Lhomme 
> <robux4 at ycbcr.xyz> a écrit :
>
>     Looking at the code it doesn't seem like we allocate it, nor lavc. I think in
>     real life it's always NULL.
>
>     There's also nothing in the VDPAU lavc doc that says we have to free it.
>     ------------------------------------------------------------------------
>       modules/hw/vdpau/avcodec.c | 3 ++-
>       1 file changed, 2 insertions(+), 1 deletion(-)
>
>     diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
>     index e4544e6e0c..40b1d8ab23 100644
>     --- a/modules/hw/vdpau/avcodec.c
>     +++ b/modules/hw/vdpau/avcodec.c
>     @@ -209,10 +209,11 @@ static void Close(vlc_va_t *va, void **hwctx)
>       {
>           vlc_va_sys_t *sys = va->sys;
>       
>     +    assert(hwctx == NULL);
>     +
>           for (unsigned i = 0; sys->pool[i] != NULL; i++)
>               vlc_vdp_video_destroy(sys->pool[i]);
>           vdp_release_x11(sys->vdp);
>     -    av_freep(hwctx);
>           free(sys);
>       }
>       
>
>
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez 
> excuser ma brièveté.
>
> _______________________________________________
> 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