mirror of
https://github.com/mpv-player/mpv
synced 2024-10-30 04:46:41 +01:00
vd_lavc: use avcodec_is_open()
This is "better", although nobody seems to know how this API is supposed to work at all.
This commit is contained in:
parent
d650fd21b1
commit
c65bce0738
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user