Skip to content

demux: flac: prevent seeking logic get stuck

Astrom Cheng requested to merge Astrom/vlc:master into master

when the seek target is near the end of a search segment, the calculation for the next position to probe gets clamped, and the search makes no progress. This leads to an infinite loop where it keeps trying to seek to the same position. To resolve this, introduce a "stagnation" check. If the calculated seek position doesn't change from one iteration to the next, break out of the loop and consider the seek "good enough". This will prevent the infinite loop and allow playback to continue.

Edited by Astrom Cheng

Merge request reports

Loading