diff options
Diffstat (limited to 'mpvcore')
-rw-r--r-- | mpvcore/player/playloop.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mpvcore/player/playloop.c b/mpvcore/player/playloop.c index 9e5aa1e0b4..90525a5ca2 100644 --- a/mpvcore/player/playloop.c +++ b/mpvcore/player/playloop.c @@ -215,6 +215,11 @@ static int seek(MPContext *mpctx, struct seek_params seek, if (!mpctx->demuxer) return -1; + if (!mpctx->demuxer->seekable) { + MP_ERR(mpctx, "Can't seek in this file.\n"); + return -1; + } + if (mpctx->stop_play == AT_END_OF_FILE) mpctx->stop_play = KEEP_PLAYING; bool hr_seek = mpctx->demuxer->accurate_seek && opts->correct_pts; |