diff options
author | wm4 <wm4@nowhere> | 2013-09-29 21:10:36 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-09-29 21:10:45 +0200 |
commit | 2c6a3cb1f27e02b2e66390a2465ab648905a64d0 (patch) | |
tree | 722c7f5e4a7d55d1442be0b60dab85f124cfdd16 /mpvcore/playlist.h | |
parent | 5b3ae5aaac4a223f1d92d56905088d1643414cdb (diff) | |
download | mpv-2c6a3cb1f27e02b2e66390a2465ab648905a64d0.tar.bz2 mpv-2c6a3cb1f27e02b2e66390a2465ab648905a64d0.tar.xz |
mplayer: fix looping of very short files
Commit 884c179 attempted to make it possible to skip backwards through
the playlist, even for files which fail to intitialize, or play for a
very short time. This was also used to prevent mpv from looping forever
and doing nothing if --loop=inf is used, and no file in the playlist is
playable.
This broke looping of very short files, because mpv was assuming that
this case happened. But there are legitimate use cases.
Fix this by making the looping case special. Instead of checking whether
playback was "very short", check whether something could be decoded and
displayed/played. If yes, allow looping.
Diffstat (limited to 'mpvcore/playlist.h')
-rw-r--r-- | mpvcore/playlist.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mpvcore/playlist.h b/mpvcore/playlist.h index 17a5cf6a9b..35d9dab701 100644 --- a/mpvcore/playlist.h +++ b/mpvcore/playlist.h @@ -38,7 +38,9 @@ struct playlist_entry { // played only for a very short time. This is used to make playlist // navigation just work in case the user has unplayable files in the // playlist. - bool playback_failed; + bool playback_short : 1; + // Set to true if not at least 1 frame (audio or video) could be played. + bool init_failed : 1; }; struct playlist { |