[vlc-commits] avcodec: vdpau: don't destroy surfaces twice in case of error
Steve Lhomme
git at videolan.org
Wed Nov 27 10:18:30 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Nov 25 16:32:40 2019 +0100| [e5276162af7a387197efe5b2670ce99df3d9a184] | committer: Steve Lhomme
avcodec: vdpau: don't destroy surfaces twice in case of error
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e5276162af7a387197efe5b2670ce99df3d9a184
---
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 74aa135f70..66c40de488 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;
}
More information about the vlc-commits
mailing list