[vlc-devel] [PATCH] avcodec: vdpau: don't destroy surfaces twice in case of error

Steve Lhomme robux4 at ycbcr.xyz
Mon Nov 25 16:33:51 CET 2019


They will be destroyed in DestroyVDPAUVideoContext when the video context is
destroyed on error. Just like they are destroyed when the video context is
destroyed in the normal case.
---
 modules/hw/vdpau/avcodec.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index 74aa135f70c..66c40de4881 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -256,8 +256,6 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, const AVPixFmtDescriptor *d
     if (i < refs)
     {
         msg_Err(va, "not enough video RAM");
-        while (i > 0)
-            vlc_vdp_video_destroy(vctx_priv->pool[--i]);
         goto error;
     }
 
-- 
2.17.1



More information about the vlc-devel mailing list