core: seek: use accurate seek mode with audio-only files

Allow more accurate absolute-only seeks even if there is no video.
This commit is contained in:
Uoti Urpala 2010-12-14 22:33:55 +02:00
parent ff706ee86d
commit de3be1d9ca
1 changed files with 1 additions and 1 deletions

View File

@ -2866,7 +2866,7 @@ static int seek(MPContext *mpctx, double amount, int style)
amount *= mpctx->timeline[mpctx->num_timeline_parts].start;
style &= ~SEEK_FACTOR;
}
if ((mpctx->demuxer->accurate_seek || mpctx->timeline) && mpctx->sh_video
if ((mpctx->demuxer->accurate_seek || mpctx->timeline)
&& !(style & (SEEK_ABSOLUTE | SEEK_FACTOR))) {
style |= SEEK_ABSOLUTE;
if (amount > 0)