fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs

fix when decoding only a single packet containing an IDR frame.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
nyanmisaka
2024-11-23 16:39:50 +08:00
parent abfc47f288
commit f22278710e

View File

@@ -815,6 +815,12 @@ static int rkmpp_get_frame(AVCodecContext *avctx, AVFrame *frame, int timeout)
ret = AVERROR_EXTERNAL;
goto exit;
}
/* no more new pkts after EOS, retry to get frame */
if (r->draining) {
mpp_frame_deinit(&mpp_frame);
return rkmpp_get_frame(avctx, frame, MPP_TIMEOUT_MAX);
}
goto exit;
} else {
av_log(avctx, AV_LOG_DEBUG, "Received a frame\n");