[mpp_dec]: add input packet buffer clear to hal thread

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@365 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-10-12 22:47:57 +00:00
parent 047d6a6495
commit 54ebf67129
2 changed files with 12 additions and 1 deletions

View File

@@ -286,6 +286,7 @@ void *mpp_dec_hal_thread(void *data)
MppDec *dec = mpp->mDec; MppDec *dec = mpp->mDec;
HalTaskGroup tasks = dec->tasks; HalTaskGroup tasks = dec->tasks;
mpp_list *frames = mpp->mFrames; mpp_list *frames = mpp->mFrames;
MppBuffer buffer = NULL;
MppBufSlots frame_slots = dec->frame_slots; MppBufSlots frame_slots = dec->frame_slots;
MppBufSlots packet_slots = dec->packet_slots; MppBufSlots packet_slots = dec->packet_slots;
@@ -324,7 +325,13 @@ void *mpp_dec_hal_thread(void *data)
* 3. add frame to output list * 3. add frame to output list
* repeat 2 and 3 until not frame can be output * repeat 2 and 3 until not frame can be output
*/ */
mpp_buf_slot_get_prop(packet_slots, task_dec->input, SLOT_BUFFER, &buffer);
if (buffer) {
mpp_buffer_put(buffer);
buffer = NULL;
}
mpp_buf_slot_clr_flag(packet_slots, task_dec->input, SLOT_HAL_INPUT); mpp_buf_slot_clr_flag(packet_slots, task_dec->input, SLOT_HAL_INPUT);
mpp_buf_slot_clr_flag(frame_slots, task_dec->output, SLOT_HAL_OUTPUT); mpp_buf_slot_clr_flag(frame_slots, task_dec->output, SLOT_HAL_OUTPUT);
for (RK_U32 i = 0; i < MPP_ARRAY_ELEMS(task_dec->refer); i++) { for (RK_U32 i = 0; i < MPP_ARRAY_ELEMS(task_dec->refer); i++) {
RK_S32 index = task_dec->refer[i]; RK_S32 index = task_dec->refer[i];

View File

@@ -70,7 +70,7 @@ Mpp::Mpp(MppCtxType type, MppCodingType coding)
mpp_buffer_group_get_internal(&mInternalGroup, MPP_BUFFER_TYPE_ION); mpp_buffer_group_get_internal(&mInternalGroup, MPP_BUFFER_TYPE_ION);
mpp_buffer_group_get_internal(&mPacketGroup, MPP_BUFFER_TYPE_ION); mpp_buffer_group_get_internal(&mPacketGroup, MPP_BUFFER_TYPE_ION);
mpp_buffer_group_limit_config(mPacketGroup, 0, 4); mpp_buffer_group_limit_config(mPacketGroup, 0, 2);
} break; } break;
case MPP_CTX_ENC : { case MPP_CTX_ENC : {
@@ -226,4 +226,8 @@ MPP_RET Mpp::get_packet(MppPacket *packet)
} }
return MPP_OK; return MPP_OK;
} }
MPP_RET Mpp::control(MpiCmd cmd, MppParam param)
{
return MPP_OK;
}