mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-09 19:10:15 +08:00
[jpegd]: Fix jpeg decoder MppBuffer crash
1. Fix jpeg decoder error on release. 2. Fix possible crash when release invalid MppBuffer handle. Change-Id: Ie904192af3352b5f967dcea6371bdb9aff194089 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -325,7 +325,8 @@ MPP_RET mpp_buffer_ref_dec(MppBufferImpl *buffer, const char* caller)
|
||||
|
||||
MPP_RET ret = MPP_OK;
|
||||
MppBufferGroupImpl *group = SEARCH_GROUP_BY_ID(buffer->group_id);
|
||||
buffer_group_add_log(group, buffer, BUF_REF_DEC, caller);
|
||||
if (group)
|
||||
buffer_group_add_log(group, buffer, BUF_REF_DEC, caller);
|
||||
|
||||
if (buffer->ref_count <= 0) {
|
||||
mpp_err_f("found non-positive ref_count %d caller %s\n",
|
||||
@@ -717,6 +718,8 @@ MppBufferGroupImpl *MppBufferService::get_group_by_id(RK_U32 id)
|
||||
}
|
||||
}
|
||||
|
||||
mpp_err_f("can not find group with id %d\n", id);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user