[vlc-commits] avcodec: vaapi: fix invalid release in case of failure

Thomas Guillem git at videolan.org
Fri Jun 16 17:38:55 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jun 16 17:37:40 2017 +0200| [06ec65926a37c5c798278c8a64dfb794cb5c1a5d] | committer: Thomas Guillem

avcodec: vaapi: fix invalid release in case of failure

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=06ec65926a37c5c798278c8a64dfb794cb5c1a5d
---

 modules/codec/avcodec/vaapi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index 871759a56f..1f1a9a04f4 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -354,6 +354,7 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
     if (vlc_vaapi_SetInstance(sys->hw_ctx.display))
     {
         msg_Err(va, "VAAPI instance already in use");
+        sys->hw_ctx.display = NULL;
         goto error;
     }
 



More information about the vlc-commits mailing list