diff --git a/libavcodec/libdavs2.c b/libavcodec/libdavs2.c index d7625718a2..c2040775ae 100644 --- a/libavcodec/libdavs2.c +++ b/libavcodec/libdavs2.c @@ -177,6 +177,7 @@ static av_cold int davs2_end(AVCodecContext *avctx) /* close the decoder */ if (cad->decoder) { + davs2_flush(avctx); davs2_decoder_close(cad->decoder); cad->decoder = NULL; }