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: 12 additions & 1 deletion libavcodec/rkmppdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame)
MppBuffer buffer = NULL;
AVDRMFrameDescriptor *desc = NULL;
AVDRMLayerDescriptor *layer = NULL;
int retrycount = 0;
int format, mode;

// on start of decoding, MPP can return -1, which is supposed to be expected
Expand All @@ -352,6 +351,18 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame)
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 (decoder->eos_reached && !mpp_frame_get_eos(mppframe)) {
if (mppframe)
mpp_frame_deinit(&mppframe);
usleep(10000);
goto retry_get_frame;
}
Copy link
Owner

Choose a reason for hiding this comment

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

Mpp frames are all released upon avframe relase. Realeasing some here dosn't make sene

if (mppframe && mpp_frame_get_eos(mppframe)) {
av_log(avctx, AV_LOG_DEBUG, "EOS frame found\n");
ret = AVERROR_EXIT;
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.

That return code is not appropriate here. Once again i have already upstreamed those changes and if you feel that a few things should be changed, you need to send those patches to ffmpeg upstream, as the reference code is there now :)

if (mppframe) {
// Check wether we have a special frame or not
if (mpp_frame_get_info_change(mppframe)) {
Expand Down