You've already forked FFmpeg
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user