mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 17:46:50 +08:00
[buf_slot]: allow to reset buffer slot's buffer pointer
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@320 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
@@ -588,6 +588,11 @@ MPP_RET mpp_buf_slot_set_buffer(MppBufSlots slots, RK_U32 index, MppBuffer buffe
|
||||
Mutex::Autolock auto_lock(impl->lock);
|
||||
slot_assert(impl, index < impl->count);
|
||||
MppBufSlotEntry *slot = &impl->slots[index];
|
||||
if (slot->buffer) {
|
||||
// NOTE: reset buffer only on stream buffer slot
|
||||
mpp_assert(NULL == slot->frame);
|
||||
mpp_buffer_put(slot->buffer);
|
||||
}
|
||||
slot->buffer = buffer;
|
||||
if (slot->frame)
|
||||
mpp_frame_set_buffer(slot->frame, buffer);
|
||||
|
Reference in New Issue
Block a user