优化循环池性能

This commit is contained in:
ziyue
2022-01-06 14:30:44 +08:00
parent e2636c5179
commit 5a592e6db6
10 changed files with 13 additions and 13 deletions

View File

@@ -180,7 +180,7 @@ Frame::Ptr MP4Demuxer::readFrame(bool &keyFrame, bool &eof) {
ctx->flags = flags;
ctx->track_id = track_id;
ctx->buffer = ctx->thiz->_buffer_pool.obtain();
ctx->buffer = ctx->thiz->_buffer_pool.obtain2();
ctx->buffer->setCapacity(bytes + DATA_OFFSET + 1);
ctx->buffer->setSize(bytes + DATA_OFFSET);
return ctx->buffer->data() + DATA_OFFSET;