summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-02 19:29:32 +0100
committerwm4 <wm4@nowhere>2014-12-02 20:36:55 +0100
commitc65bce07386df8cee1e5c7a84cc8eb615b65663e (patch)
tree7c5a5afa599d45f330d9b58d4bde9c586e140e73 /video
parentd650fd21b12f64bf70acc66c0fb7813f77a1a1a4 (diff)
downloadmpv-c65bce07386df8cee1e5c7a84cc8eb615b65663e.tar.bz2
mpv-c65bce07386df8cee1e5c7a84cc8eb615b65663e.tar.xz
vd_lavc: use avcodec_is_open()
This is "better", although nobody seems to know how this API is supposed to work at all.
Diffstat (limited to 'video')
-rw-r--r--video/decode/vd_lavc.c2
1 files changed, 1 insertions, 1 deletions
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)