fix[m4v_parser]: Fix split_parse setting failure issue

Platform: Linux,General

Error case:
When decoding an MPEG4 source, it is unable to properly
configure split_parse. need_split is only initialized
during init.

Solution:
Use the split_parse parameter in the dec_cfg.

From: redmine #526753

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I89eb4dc8fcc2a1b00d73d359979770f7afefe0d3
This commit is contained in:
Hongjin Li
2024-12-25 11:01:03 +08:00
parent 07b4bca5f3
commit 15bcad26db

View File

@@ -42,9 +42,8 @@ typedef struct {
RK_U32 got_eos;
// runtime parameter
RK_U32 need_split;
RK_U32 frame_count;
RK_U32 internal_pts;
MppDecCfgSet *dec_cfg;
// parser context
Mpg4dParser parser;
@@ -91,12 +90,7 @@ static MPP_RET mpg4d_init(void *dec, ParserCfg *cfg)
p->frame_slots = cfg->frame_slots;
p->packet_slots = cfg->packet_slots;
p->task_count = 2;
#ifdef __ANDROID__
p->need_split = 1;//cfg->need_split;
#else
p->need_split = cfg->cfg->base.split_parse;
#endif
p->internal_pts = cfg->cfg->base.internal_pts;
p->dec_cfg = cfg->cfg;
p->stream = stream;
p->stream_size = stream_size;
p->task_pkt = task_pkt;
@@ -240,7 +234,7 @@ static MPP_RET mpg4d_prepare(void *dec, MppPacket pkt, HalDecTask *task)
}
}
if (!p->need_split ||
if (!p->dec_cfg->base.split_parse ||
(mpp_packet_get_flag(pkt) & MPP_PACKET_FLAG_EXTRA_DATA)) {
p->got_eos = eos;
task->flags.eos = eos;