Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions libavcodec/rkmppdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,16 +347,9 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame)
// in order to let it time to complete it's init, then we sleep a bit between retries.
retry_get_frame:
ret = decoder->mpi->decode_get_frame(decoder->ctx, &mppframe);
if (ret != MPP_OK && ret != MPP_ERR_TIMEOUT && !decoder->first_frame) {
if (retrycount < 5) {
av_log(avctx, AV_LOG_DEBUG, "Failed to get a frame, retrying (code = %d, retrycount = %d)\n", ret, retrycount);
usleep(10000);
retrycount++;
goto retry_get_frame;
} else {
av_log(avctx, AV_LOG_ERROR, "Failed to get a frame from MPP (code = %d)\n", ret);
goto fail;
}
if (ret != MPP_OK) {
av_log(avctx, AV_LOG_ERROR, "can't get a frame frome decoder (code = %d)\n", ret);
goto fail;
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would happen almost at each start and was confirmed by rk, we don't want error log in normal conditions at each start


if (mppframe) {
Expand Down