[mpp_buffer]: fix mpp_buffer log counter error

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1054 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2016-07-20 09:50:44 +00:00
parent 0d1e5041e1
commit 1cba9ddca2

View File

@@ -139,13 +139,16 @@ void buffer_group_add_log(MppBufferGroupImpl *group, MppBufferImpl *buffer, MppB
log->ops = ops;
log->ref_count = (buffer) ? (buffer->ref_count) : (0);
log->caller = caller;
if (group->log_count >= BUFFER_OPS_MAX_COUNT) {
struct list_head *tmp = logs->next;
list_del_init(tmp);
mpp_free(list_entry(tmp, MppBufLog, list));
group->log_count--;
}
list_add_tail(&log->list, logs);
group->log_count++;
}
if (group->log_count >= BUFFER_OPS_MAX_COUNT) {
struct list_head *tmp = logs->next;
list_del_init(tmp);
mpp_free(list_entry(tmp, MppBufLog, list));
}
list_add_tail(&log->list, logs);
}
}