From c65bce07386df8cee1e5c7a84cc8eb615b65663e Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 2 Dec 2014 19:29:32 +0100 Subject: vd_lavc: use avcodec_is_open() This is "better", although nobody seems to know how this API is supposed to work at all. --- video/decode/vd_lavc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 7ac92d6901..455ae892db 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -430,7 +430,7 @@ static void uninit_avctx(struct dec_video *vd) vd_ffmpeg_ctx *ctx = vd->priv; AVCodecContext *avctx = ctx->avctx; - if (avctx && avctx->codec) + if (avctx && avcodec_is_open(avctx)) avcodec_flush_buffers(avctx); if (ctx->hwdec && ctx->hwdec->uninit) -- cgit v1.2.3