Skip to content

encoder: flush async pipeline in GetBitstream before shutdown#220

Merged
zlatinski merged 1 commit intomainfrom
flush_async_pipeline_before_shutdown
Mar 31, 2026
Merged

encoder: flush async pipeline in GetBitstream before shutdown#220
zlatinski merged 1 commit intomainfrom
flush_async_pipeline_before_shutdown

Conversation

@zlatinski
Copy link
Copy Markdown
Contributor

GetBitstream() was a no-op stub that never flushed the async assembly pipeline. The test app calls GetBitstream() after encoding all frames, expecting it to complete all pending assembly work. Without the flush, deferred frames with unsignaled fences remain in the assembly queue.

Fix: GetBitstream() now calls WaitForThreadsToComplete() which pushes deferred frames, waits for assembly threads to finish, and joins them.

Also adds VkThreadSafeQueue::Drain() utility and m_vkDevCtx null guard in DeinitEncoder() for robustness during partial-init teardown.

GetBitstream() was a no-op stub that never flushed the async assembly
pipeline. The test app calls GetBitstream() after encoding all frames,
expecting it to complete all pending assembly work. Without the flush,
deferred frames with unsignaled fences remain in the assembly queue.

Fix: GetBitstream() now calls WaitForThreadsToComplete() which pushes
deferred frames, waits for assembly threads to finish, and joins them.

Also adds VkThreadSafeQueue::Drain() utility and m_vkDevCtx null guard
in DeinitEncoder() for robustness during partial-init teardown.

Signed-off-by: Tony Zlatinski <tzlatinski@nvidia.com>
@zlatinski zlatinski merged commit 58d9a8e into main Mar 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant