From bd9bba40ee8e2d11ecfa987b744667dc221870d3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 8 Jun 2016 11:59:11 +0200 Subject: player: tell user about --force-seeking if demuxer is not seekable This comes up often, see e.g. #3220. The issue is that if the stream input is not seekable, the demuxer is marked as not seekable. But if the stream cache is enabled, the file still _might_ be seekable to a degree. We recently disabled seeking in this mode because it can cause very weird issues, mostly because if stream-layer seeking fails, the demuxers will arbitrarily misbehave. On the other hand, it can work if the seek is within the cached range, which is why the user can still enable it with --force-seeking. There is a weird trade-off between allowing this and not crapping up too easily, so just informing the user about the possibility seems best. --- player/playloop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/player/playloop.c b/player/playloop.c index 56701dbc34..87acfe3cc7 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -189,7 +189,8 @@ static int mp_seek(MPContext *mpctx, struct seek_params seek) return -1; if (!mpctx->demuxer->seekable) { - MP_ERR(mpctx, "Can't seek in this file.\n"); + MP_ERR(mpctx, "Cannot seek in this file.\n"); + MP_ERR(mpctx, "You can forcibly enable it with '--force-seeking=yes'.\n"); return -1; } -- cgit v1.2.3