diff options
author | Dudemanguy <random342@airmail.cc> | 2023-08-14 14:13:02 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-08-16 13:01:28 +0000 |
commit | 0b4a36476d0efcb4715a56c6e6de241af9a4b9ec (patch) | |
tree | c9de7619cb191d1aab5a66ce3e0c969a9f62cec2 /input | |
parent | f19bafc0e442dedf3573e92e1cd4ef332217924d (diff) | |
download | mpv-0b4a36476d0efcb4715a56c6e6de241af9a4b9ec.tar.bz2 mpv-0b4a36476d0efcb4715a56c6e6de241af9a4b9ec.tar.xz |
loadfile: avoid infinite playlist loading loops
There are a number of ways one can craft a playlist file that refers to
itself or cleverly goes around in a loop to other playlist files. There
is obviously no use for this, but mpv spins around forever trying to
load the files so you have to just SIGTERM/SIGKILL it. We can be smarter
about this and attempt to detect it. The condition for detecting this is
surprisingly simple: the filename of the first entry in the playlist
must match a previous playlist path we stored. If we get this, we can
then log an error and stop playback. If there is a "real" file loaded at
any point in time, then we know it's not an infinite loop and clear out
the saved playlist paths. Fixes #3967.
Diffstat (limited to 'input')
0 files changed, 0 insertions, 0 deletions