Mercurial > mplayer.hg
changeset 37187:db6c0aa280ff
bluray: fix seek implementation again.
author | reimar |
---|---|
date | Wed, 17 Sep 2014 18:00:19 +0000 |
parents | 297da727ee2b |
children | 32aab8a15bfc |
files | stream/stream_bluray.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/stream_bluray.c Wed Sep 17 17:49:55 2014 +0000 +++ b/stream/stream_bluray.c Wed Sep 17 18:00:19 2014 +0000 @@ -93,7 +93,9 @@ p = bd_seek(b->bd, pos); // bd_seek does not say what happens on errors, // so be extra paranoid. - if (p < 0 || p != pos) { + // bd_seek also does not seek exactly to the requested + // position, so allow for some fuzz. + if (p < 0 || p > pos || p + 20*1024*1024 < pos) { s->pos = bd_tell(b->bd); return 0; }