1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-09-16 08:36:51 +02:00

avcodec/rkmppdec: fix return EAGAIN during flushing

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
Zhao Zhili
2025-09-13 13:31:17 +08:00
parent 0773343ed7
commit 9e3c07f2df

View File

@@ -519,11 +519,15 @@ static int rkmpp_receive_frame(AVCodecContext *avctx, AVFrame *frame)
}
// make sure we keep decoder full
if (freeslots > 1)
if (freeslots > 1 && !decoder->eos_reached)
return AVERROR(EAGAIN);
}
return rkmpp_retrieve_frame(avctx, frame);
do {
ret = rkmpp_retrieve_frame(avctx, frame);
} while (decoder->eos_reached && ret == AVERROR(EAGAIN));
return ret;
}
static av_cold void rkmpp_flush(AVCodecContext *avctx)