Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements for Rockchip ffmpeg #4

Open
wants to merge 9 commits into
base: rockchip
Choose a base branch
from
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
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