[FFmpeg-devel] [PATCH] avcodec/rkmpp : reset end of stream flag on flush
David Sowa
onesowa at gmail.com
Mon Oct 26 22:26:05 EET 2020
Currently the flag eos_reached is set to 1 on end of stream
and there is no mechanism to reset it to 0. After a flush new
buffers should be able to be decoded but the eos_reached flag
causes all the frames to be dropped. Reset the eos_reached flag
to 0 during the flush operation to allow new frames to be
decoded.
---
libavcodec/rkmppdec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/rkmppdec.c b/libavcodec/rkmppdec.c
index 248020d5d6..bf1bf0b013 100644
--- a/libavcodec/rkmppdec.c
+++ b/libavcodec/rkmppdec.c
@@ -544,6 +544,7 @@ static void rkmpp_flush(AVCodecContext *avctx)
ret = decoder->mpi->reset(decoder->ctx);
if (ret == MPP_OK) {
decoder->first_packet = 1;
+ decoder->eos_reached = 0;
} else
av_log(avctx, AV_LOG_ERROR, "Failed to reset MPI (code = %d)\n", ret);
}
--
2.25.1
More information about the ffmpeg-devel
mailing list