From dad90f616da5665e6e27a516f78c2a5fa66162c2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 27 Aug 2014 10:55:59 +0200 Subject: player: fix basic playback The "buffering" logic was active even if the stream cache was disabled. This is contrary to what the manpage says. It also breaks playback because of another bug: the demuxer cache is smaller than 2 seconds, and thus the resume condition never becomes true. Explicitly run this code only if the stream cache is enabled. Also, fix the underlying problem of the breakage, and resume when the demuxer thread stops reading in any case, not just on EOF. Broken by previous commit. Unbreaks playback of local files. --- demux/demux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demux/demux.c') diff --git a/demux/demux.c b/demux/demux.c index 2560a0736d..c62c0754b8 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -1185,7 +1185,7 @@ static int cached_demux_control(struct demux_internal *in, int cmd, void *arg) r->ts_range[1] = MP_PTS_MIN(r->ts_range[1], ds->last_ts); } } - r->idle &= !r->underrun; + r->idle = (r->idle && !r->underrun) || r->eof; return DEMUXER_CTRL_OK; } } -- cgit v1.2.3