diff options
-rw-r--r-- | video/decode/vd_lavc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 8dfc1a77cd..6132c0d447 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -430,6 +430,9 @@ static void uninit_avctx(struct dec_video *vd) vd_ffmpeg_ctx *ctx = vd->priv; AVCodecContext *avctx = ctx->avctx; + if (avctx) + avcodec_flush_buffers(avctx); + if (ctx->hwdec && ctx->hwdec->uninit) ctx->hwdec->uninit(ctx); |