[mpp_dec]: fix MppBuffer leak on reset

[mpp_buffer]: add more log

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1123 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2016-07-28 11:30:47 +00:00
parent 73ceedd541
commit 53ad111527
3 changed files with 30 additions and 30 deletions

View File

@@ -199,7 +199,11 @@ static RK_U32 reset_dec_task(Mpp *mpp, DecTask *task)
dec->mpp_pkt_in = NULL;
}
while (MPP_OK == mpp_buf_slot_dequeue(frame_slots, &index, QUEUE_DISPLAY)) {
mpp_buf_slot_set_prop(frame_slots, index, SLOT_FRAME, NULL);
/* release extra ref in slot's MppBuffer */
MppBuffer buffer = NULL;
mpp_buf_slot_get_prop(frame_slots, index, SLOT_BUFFER, &buffer);
if (buffer)
mpp_buffer_put(buffer);
mpp_buf_slot_clr_flag(frame_slots, index, SLOT_QUEUE_USE);
}
if (task->status.dec_pkt_copy_rdy) {
@@ -252,7 +256,10 @@ static void mpp_dec_push_display(Mpp *mpp)
if (!dec->reset_flag) {
mpp_put_frame(mpp, frame);
} else {
mpp_buf_slot_set_prop(frame_slots, index, SLOT_FRAME, NULL);
/* release extra ref in slot's MppBuffer */
MppBuffer buffer = mpp_frame_get_buffer(frame);
if (buffer)
mpp_buffer_put(buffer);
}
mpp_buf_slot_clr_flag(frame_slots, index, SLOT_QUEUE_USE);
}