Skip to content

Conversation

@xx205
Copy link

@xx205 xx205 commented Apr 18, 2025

SkipFramesImpl could hang when decoder_->Pop returned false after receiving an empty NDArray (EAGAIN signal), as the skip counter didn't decrement. If the decoder then stalled, frame_count_ remained zero, causing subsequent Pop calls to fail rapidly at the entry check, leading to hangs or malloc deadlocks. This commit adds a retry limit to the SkipFramesImpl loop to break this rapid failure cycle after consecutive Pop failures. This improves robustness when skipping frames in problematic videos after seeking.

SkipFramesImpl could hang when `decoder_->Pop` returned `false` after receiving an empty NDArray (EAGAIN signal), as the skip counter didn't decrement. If the decoder then stalled, `frame_count_` remained zero, causing subsequent `Pop` calls to fail rapidly at the entry check, leading to hangs or malloc deadlocks. This commit adds a retry limit to the `SkipFramesImpl` loop to break this rapid failure cycle after consecutive `Pop` failures. This improves robustness when skipping frames in problematic videos after seeking.
@xx205
Copy link
Author

xx205 commented Apr 18, 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