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

Rémi Denis-Courmont remi at remlab.net
Thu Dec 20 11:55:32 CET 2018


It is necessary in some lavc versions. This probably needs a bump in requirements first.

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);
> }
> 
>-- 
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20181220/f3dc099d/attachment.html>


More information about the vlc-devel mailing list