decord icon indicating copy to clipboard operation
decord copied to clipboard

fix(video): Prevent hang in SkipFramesImpl by adding pop retry limit

Open xx205 opened this issue 9 months ago • 1 comments

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 avatar Apr 18 '25 07:04 xx205

#269 #341 QwenLM/Qwen2.5-VL#1078 vectorspacelab/Video-XL#40

xx205 avatar Apr 18 '25 07:04 xx205