mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-09-27 05:09:41 +08:00
fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
refine return value handling. Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
@@ -783,9 +783,15 @@ static int rkmpp_get_frame(AVCodecContext *avctx, AVFrame *frame, int timeout)
|
|||||||
else
|
else
|
||||||
ret = r->mapi->decode_get_frame(r->mctx, &mpp_frame);
|
ret = r->mapi->decode_get_frame(r->mctx, &mpp_frame);
|
||||||
|
|
||||||
if (ret != MPP_OK && ret != MPP_ERR_TIMEOUT) {
|
if (ret != MPP_OK) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Failed to get frame: %d\n", ret);
|
if (timeout == MPP_TIMEOUT_NON_BLOCK) {
|
||||||
return AVERROR_EXTERNAL;
|
av_log(avctx, AV_LOG_ERROR, "Failed to get frame (non-block): %d\n", ret);
|
||||||
|
return AVERROR_EXTERNAL;
|
||||||
|
}
|
||||||
|
if (timeout != MPP_TIMEOUT_NON_BLOCK && ret != MPP_NOK && ret != MPP_ERR_TIMEOUT) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Failed to get frame (timeout: %d): %d\n", timeout, ret);
|
||||||
|
return AVERROR_EXTERNAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mpp_frame) {
|
if (!mpp_frame) {
|
||||||
|
Reference in New Issue
Block a user