summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/decode/vd_lavc.c1
-rw-r--r--video/decode/vdpau.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 72209f5048..d25c99981e 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -598,6 +598,7 @@ static void uninit_avctx(struct dec_video *vd)
if (ctx->hwdec && ctx->hwdec->uninit)
ctx->hwdec->uninit(ctx);
ctx->hwdec = NULL;
+ assert(ctx->hwdec_priv == NULL);
av_freep(&ctx->avctx);
diff --git a/video/decode/vdpau.c b/video/decode/vdpau.c
index a86f5d1edf..93a1e6d9a3 100644
--- a/video/decode/vdpau.c
+++ b/video/decode/vdpau.c
@@ -86,7 +86,7 @@ static void uninit(struct lavc_ctx *ctx)
XCloseDisplay(p->display);
}
- talloc_free(p);
+ TA_FREEP(&ctx->hwdec_priv);
if (ctx->avctx)
av_freep(&ctx->avctx->hwaccel_context);