summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-18 22:13:41 +0100
committerwm4 <wm4@nowhere>2015-03-18 22:15:02 +0100
commit39ed9b7d96f553096eeb02117ff531e42c11951d (patch)
treec2696bad0922e02f206d7ca96f6d03d38f12ee16
parent51befc9debef818cbf071aebf8861457ac095f8d (diff)
downloadmpv-39ed9b7d96f553096eeb02117ff531e42c11951d.tar.bz2
mpv-39ed9b7d96f553096eeb02117ff531e42c11951d.tar.xz
player: refuse to write resume file with unseekable files
In fact this should happen on resume, not on saving, but it's simpler this way. Fixes #1701.
-rw-r--r--player/configfiles.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/player/configfiles.c b/player/configfiles.c
index 621c2f96e1..d161977248 100644
--- a/player/configfiles.c
+++ b/player/configfiles.c
@@ -289,6 +289,12 @@ void mp_write_watch_later_conf(struct MPContext *mpctx)
if (!filename)
goto exit;
+ struct demuxer *demux = mpctx->demuxer;
+ if (demux && demux->seekable && demux->partially_seekable) {
+ MP_INFO(mpctx, "Not seekable - not saving state.\n");
+ goto exit;
+ }
+
double pos = get_current_time(mpctx);
if (pos == MP_NOPTS_VALUE)
goto exit;