summaryrefslogtreecommitdiffstats
path: root/mpvcore/mp_core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-29 21:10:36 +0200
committerwm4 <wm4@nowhere>2013-09-29 21:10:45 +0200
commit2c6a3cb1f27e02b2e66390a2465ab648905a64d0 (patch)
tree722c7f5e4a7d55d1442be0b60dab85f124cfdd16 /mpvcore/mp_core.h
parent5b3ae5aaac4a223f1d92d56905088d1643414cdb (diff)
downloadmpv-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/mp_core.h')
-rw-r--r--mpvcore/mp_core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mpvcore/mp_core.h b/mpvcore/mp_core.h
index e15ec0355e..28f34ee580 100644
--- a/mpvcore/mp_core.h
+++ b/mpvcore/mp_core.h
@@ -148,6 +148,8 @@ typedef struct MPContext {
bool has_quit_custom_rc;
bool error_playing;
+ int64_t shown_vframes, shown_aframes;
+
struct demuxer **sources;
int num_sources;