Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadfile: fix --loop-playlist=N with --prefetch-playlist #15296

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Nov 12, 2024

  1. loadfile: fix --loop-playlist=N with --prefetch-playlist

    With --prefetch-playlist and --loop-playlist, mp_next_file() is called
    continously since the last second of playback or when viewing an image,
    which decreases --loop-playlist=N to 1.
    
    Fix this by adding a flag to mp_next_file() to specify whether to
    decrement --loop-playlist=N. The first playlist entry is still
    prefetched when it's the next one, but without decrementing
    --loop-playlist=N.
    guidocella committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    e624007 View commit details
    Browse the repository at this point in the history
  2. loadfile: return earlier if prefetch already started

    There is no need to call mp_next_file() is prefetching already started
    so return earlier.
    guidocella committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    41ab701 View commit details
    Browse the repository at this point in the history
  3. loadfile: fix --loop-playlist + --shuffle + --prefetch-playlist

    With this combination of options, the playlist is shuffled every time
    the last playlist is reached, instead of when restarting from the first
    playlist entry. Abort prefetching in this case, as we can't predict
    which file to prefetch until the playlist is shuffled when actually
    going to the first file again.
    guidocella committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    879b4cd View commit details
    Browse the repository at this point in the history