-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add parent meta to compensated buffers #132
Add parent meta to compensated buffers #132
Conversation
Thanks for the fix @JassonRM . However I don't understand how this fixes the original problem, the buffer is still not available, why isn't the pool allocating new buffers with this approach? |
@michaelgruner the problem was because the original buffer was unreferenced but the underlying memory wasn't. So the bufferpool would try to recycle the buffer right away but fail due to the memory being used. Adding the parent meta the buffer is only recycled once all the child buffers have been unreferenced. And there is no need to allocate more since the bufferpool contains enough to keep recycling them after they stopped being used. |
This should also be true for RESTART_TIMESTAMP isn't it? |
It is, I just added it. However, I was wondering why RESTART_TIMESTAMP never used |
It was an error, and it got past the reviews. Thanks for adding it. |
Hi @michaelgruner @rrcarlosrodriguez, to remind you I don't have permission to merge this pull request. |
I think there might be some side-effect could be introduced by this change. The gst_buffer_ref would increase the refcount of given buffer. |
Adding parent meta to the compensated buffers avoided upstream bufferpools from trying to recycle the buffers before the memory was unreferenced. Solving issue #131.