Skip to content

Throttle decoded frames and add log - verified, stable #6431

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kjyoun
Copy link
Contributor

@kjyoun kjyoun commented Jul 15, 2025

This commit introduces a throttling mechanism to limit the number of video frames being decoded simultaneously. This is intended to prevent excessive memory usage and crashes, particularly during high-resolution (e.g., 8K) video playback.

The main changes include:

  • A hard limit (kMaxFramesInDecoder) is introduced to cap the number of video frames that can be in the decoder pipeline at any given time.
  • The CanAcceptMoreData() logic in the video renderer is updated to enforce this new limit, effectively pausing input when the decoder is at capacity.
  • Adds extensive logging and frame counting to monitor the number of alive, pending, and decoded frames, which helps in debugging and verifying the throttling mechanism.

@kjyoun kjyoun force-pushed the oom/throttle-decoded branch from 6166ea5 to fab4adb Compare July 16, 2025 17:49
@kjyoun kjyoun changed the title Throttle decoded frames and add log Throttle decoded frames and add log - verified, stable Jul 16, 2025
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