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.
This commit is contained in:
wm4 2015-03-18 22:13:41 +01:00
parent 51befc9deb
commit 39ed9b7d96
1 changed files with 6 additions and 0 deletions

View File

@ -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;