po5 / thumbfast

High-performance on-the-fly thumbnailer script for mpv
Mozilla Public License 2.0
760 stars 34 forks source link

[regression] Changing vid would cause freezing thumbnails #59

Closed hooke007 closed 1 year ago

hooke007 commented 1 year ago

The last safe commit https://github.com/po5/thumbfast/commit/d485bc443a5052a87f3210c4236138534c0c247d

After that thumbs would be freezed by changing vid.

Related: https://github.com/po5/thumbfast/pull/25

dyphire commented 1 year ago

Can be reproduced on Windows.

https://user-images.githubusercontent.com/61936050/199252907-87361b87-17c8-45db-ba28-8f231a3a4d7f.mp4

hooke007 commented 1 year ago

From the history record, I got the feasible commits. https://github.com/po5/thumbfast/compare/8834ef565372264c079e578dd540018cec1f587d..0b2c2ccfe984a6e53f05dfbad1869e5ff2192227

natural-harmonia-gropius commented 1 year ago

This will happen when vid=0. that we can't touch effective_w, effective_h, so disabled = not (w and h) not work as I except. and I think debounce for video-out-params is inevitable, there's a race-condition, sometimes we respawned the subprocess first then we disabled.

po5 commented 1 year ago

Don't think there's a race condition in this solution (: