diff --git a/mpp/codec/mpp_dec.cpp b/mpp/codec/mpp_dec.cpp index 03a315e8..6880802f 100644 --- a/mpp/codec/mpp_dec.cpp +++ b/mpp/codec/mpp_dec.cpp @@ -286,6 +286,7 @@ void *mpp_dec_hal_thread(void *data) MppDec *dec = mpp->mDec; HalTaskGroup tasks = dec->tasks; mpp_list *frames = mpp->mFrames; + MppBuffer buffer = NULL; MppBufSlots frame_slots = dec->frame_slots; MppBufSlots packet_slots = dec->packet_slots; @@ -324,7 +325,13 @@ void *mpp_dec_hal_thread(void *data) * 3. add frame to output list * 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(frame_slots, task_dec->output, SLOT_HAL_OUTPUT); for (RK_U32 i = 0; i < MPP_ARRAY_ELEMS(task_dec->refer); i++) { RK_S32 index = task_dec->refer[i]; diff --git a/mpp/mpp.cpp b/mpp/mpp.cpp index ea08fd34..e879ae09 100644 --- a/mpp/mpp.cpp +++ b/mpp/mpp.cpp @@ -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(&mPacketGroup, MPP_BUFFER_TYPE_ION); - mpp_buffer_group_limit_config(mPacketGroup, 0, 4); + mpp_buffer_group_limit_config(mPacketGroup, 0, 2); } break; case MPP_CTX_ENC : { @@ -226,4 +226,8 @@ MPP_RET Mpp::get_packet(MppPacket *packet) } return MPP_OK; } +MPP_RET Mpp::control(MpiCmd cmd, MppParam param) +{ + return MPP_OK; +}