diff options
Diffstat (limited to 'video/decode')
-rw-r--r-- | video/decode/vd_lavc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index e02da5ebda..e5de69499d 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -664,11 +664,7 @@ static void uninit_avctx(struct dec_video *vd) av_frame_free(&ctx->pic); av_buffer_unref(&ctx->cached_hw_frames_ctx); - if (ctx->avctx) { - if (avcodec_close(ctx->avctx) < 0) - MP_ERR(vd, "Could not close codec.\n"); - av_freep(&ctx->avctx->extradata); - } + avcodec_free_context(&ctx->avctx); if (ctx->hwdec_dev && ctx->hwdec && ctx->hwdec->generic_hwaccel && ctx->hwdec_dev->destroy) |