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.
This commit is contained in:
1 parent
aeb3df0e2c
commit
bd9bba40ee
1 file changed
+2
-1
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user