decord
decord copied to clipboard
fix(video): Prevent hang in SkipFramesImpl by adding pop retry limit
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.
#269 #341 QwenLM/Qwen2.5-VL#1078 vectorspacelab/Video-XL#40