fix: make FrameContainerQueue::pop() blocking to prevent CPU spinning#420
fix: make FrameContainerQueue::pop() blocking to prevent CPU spinning#420yashrajsapra wants to merge 1 commit intomainfrom
Conversation
Test Results Linux 1 files ±0 1 suites ±0 10m 17s ⏱️ ±0s For more details on these failures, see this check. Results for commit baaeca2. ± Comparison against base commit d8a11b7. |
kumaakh
left a comment
There was a problem hiding this comment.
@yashrajsapra the FrameContainerQueueAdapter was written to handle the case of dropped P frames during push. basically if a P frame is dropped we wanted to drop all the following frames till an I frame showed up.
The adaptation of pop() was unnecessarily added assuming that in future someone will need it and that created this bad outcome...
The way you have fixed it, shows that the adaptation is redundant...
pop() is now calling on_pop_success() and not adding any additonal value...
May be we can just implement it as
retrun mAdaptee->pop();
and let the Module react to the reurn value being not null ?
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #419
Description
Refactord Pop function to block the thread, when no frames are their in the queue
Type
Type Choose one: (Bug fix | Feature | Documentation | Testing | Other)
Screenshots (if applicable)
Checklist