diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 72209f5048488..d25c99981e573 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 a86f5d1edf80a..93a1e6d9a343d 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);