mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 09:06:50 +08:00
[mpp_service]: Adjust the timing of codec info set
Change-Id: I6d21be4506f4c65bfb8717f07b2d55a65fb50cfe Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
This commit is contained in:
@@ -411,6 +411,21 @@ MPP_RET mpp_service_cmd_send(void *ctx)
|
||||
p->req_cnt++;
|
||||
}
|
||||
|
||||
if (p->info_count) {
|
||||
if (p->support_set_info) {
|
||||
MppReqV1 *mpp_req = &p->reqs[p->req_cnt];;
|
||||
|
||||
mpp_req->cmd = MPP_CMD_SEND_CODEC_INFO;
|
||||
mpp_req->flag = 0;
|
||||
mpp_req->size = p->info_count * sizeof(p->info[0]);
|
||||
mpp_req->offset = 0;
|
||||
mpp_req->data_ptr = REQ_DATA_PTR(p->info);
|
||||
|
||||
p->req_cnt++;
|
||||
}
|
||||
p->info_count = 0;
|
||||
}
|
||||
|
||||
/* setup flag for multi message request */
|
||||
if (p->req_cnt > 1) {
|
||||
RK_S32 i;
|
||||
@@ -433,25 +448,6 @@ MPP_RET mpp_service_cmd_send(void *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
if (p->info_count) {
|
||||
if (p->support_set_info) {
|
||||
MppReqV1 req;
|
||||
|
||||
req.cmd = MPP_CMD_SEND_CODEC_INFO;
|
||||
req.flag = 0;
|
||||
req.size = p->info_count * sizeof(p->info[0]);
|
||||
req.offset = 0;
|
||||
req.data_ptr = REQ_DATA_PTR(p->info);
|
||||
|
||||
ret = mpp_service_ioctl_request(p->client, &req);
|
||||
if (ret) {
|
||||
p->support_set_info = 0;
|
||||
ret = MPP_OK;
|
||||
}
|
||||
}
|
||||
p->info_count = 0;
|
||||
}
|
||||
|
||||
p->req_cnt = 0;
|
||||
p->reg_offset_count = 0;
|
||||
p->rcb_count = 0;
|
||||
|
Reference in New Issue
Block a user