mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-21 16:19:23 +08:00
[mpp_service]: Enlarge max register offset count
Change-Id: I65ab110dcba5cf1d7c90c6996f12872c833b7c93 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -234,7 +234,7 @@ void check_mpp_service_cap(RK_U32 *codec_type, RK_U32 *hw_ids, MppServiceCmdCap
|
||||
close(fd);
|
||||
}
|
||||
|
||||
#define MAX_REG_OFFSET 16
|
||||
#define MAX_REG_OFFSET 32
|
||||
#define MAX_INFO_COUNT 16
|
||||
|
||||
typedef struct FdTransInfo_t {
|
||||
@@ -337,6 +337,11 @@ MPP_RET mpp_service_reg_offset(void *ctx, MppDevRegOffsetCfg *cfg)
|
||||
if (!cfg->offset)
|
||||
return MPP_OK;
|
||||
|
||||
if (p->reg_offset_count >= MAX_REG_OFFSET) {
|
||||
mpp_err_f("reach max offset definition\n", MAX_REG_OFFSET);
|
||||
return MPP_NOK;
|
||||
}
|
||||
|
||||
RegOffsetInfo *info = &p->reg_offset_info[p->reg_offset_count++];
|
||||
|
||||
info->reg_idx = cfg->reg_idx;
|
||||
|
Reference in New Issue
Block a user