mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-09-26 21:03:43 +08:00
fixup! lavc/rkmppdec: refactor RKMPP decoders and extend codecs
remove MAX_ERRINFO_COUNT. Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
@@ -148,7 +148,6 @@ static av_cold int rkmpp_decode_close(AVCodecContext *avctx)
|
||||
r->eof = 0;
|
||||
r->draining = 0;
|
||||
r->info_change = 0;
|
||||
r->errinfo_cnt = 0;
|
||||
r->got_frame = 0;
|
||||
r->use_rfbc = 0;
|
||||
|
||||
@@ -756,7 +755,7 @@ static int rkmpp_get_frame(AVCodecContext *avctx, AVFrame *frame, int timeout)
|
||||
}
|
||||
if (mpp_frame_get_errinfo(mpp_frame)) {
|
||||
av_log(avctx, AV_LOG_DEBUG, "Received a 'errinfo' frame\n");
|
||||
ret = (r->errinfo_cnt++ > MAX_ERRINFO_COUNT) ? AVERROR_EXTERNAL : AVERROR(EAGAIN);
|
||||
ret = AVERROR(EAGAIN);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -829,7 +828,6 @@ static int rkmpp_get_frame(AVCodecContext *avctx, AVFrame *frame, int timeout)
|
||||
goto exit;
|
||||
} else {
|
||||
av_log(avctx, AV_LOG_DEBUG, "Received a frame\n");
|
||||
r->errinfo_cnt = 0;
|
||||
r->got_frame = 1;
|
||||
|
||||
switch (avctx->pix_fmt) {
|
||||
@@ -1019,7 +1017,6 @@ static void rkmpp_decode_flush(AVCodecContext *avctx)
|
||||
r->eof = 0;
|
||||
r->draining = 0;
|
||||
r->info_change = 0;
|
||||
r->errinfo_cnt = 0;
|
||||
r->got_frame = 0;
|
||||
|
||||
av_packet_unref(&r->last_pkt);
|
||||
|
@@ -41,7 +41,6 @@
|
||||
#include "libavutil/opt.h"
|
||||
#include "libavutil/pixdesc.h"
|
||||
|
||||
#define MAX_ERRINFO_COUNT 100
|
||||
#define MAX_SOC_NAME_LENGTH 128
|
||||
|
||||
typedef struct RKMPPDecContext {
|
||||
@@ -58,7 +57,6 @@ typedef struct RKMPPDecContext {
|
||||
int eof;
|
||||
int draining;
|
||||
int info_change;
|
||||
int errinfo_cnt;
|
||||
int got_frame;
|
||||
int use_rfbc;
|
||||
|
||||
|
Reference in New Issue
Block a user