"exact" playback in `mlv_play` is very picky about the FPS

Issue #1999 resolved
Albert Shih created an issue

In mlv_play, mlv_play_start_fps_timer looks for an exact match for the FPS, to three decimal places. This is a problem when FPS override is not optimized for "Exact FPS", and even the 50D non-overridden frame rate is not exactly 30 (or 29.97) fps. This is annoying because it means it is not possible to use "exact" playback mode to drop frames, even if the actual FPS is very close to one of the ideal ones.

But there's more. If it does not find a match, it not only cancels "exact" playback mode if it is on, but it also skips the code for prepping the queue and counters. That means if someone switches to "exact" playback mode during an active playback, mlv_play actually gets stuck in a while loop and the playback hangs.

Comments (6)

  1. Alex

    Maybe this explains why I could never see a difference between the two modes (switching between "exact" and "all" appeared to have no effect when I tried it).

    In FPS override I simply pick the best match (minimum difference). This happens in fps_try_to_get_exact_freq. Maybe a similar approach could help here too.

  2. Albert Shih reporter

    Error handling works fine, but the primary issue is still an issue. I'm going to create a PR with a proposed fix.

  3. Log in to comment