Mercurial > mplayer.hg
comparison stream/stream_bluray.c @ 37187:db6c0aa280ff
bluray: fix seek implementation again.
author | reimar |
---|---|
date | Wed, 17 Sep 2014 18:00:19 +0000 |
parents | 297da727ee2b |
children | 32aab8a15bfc |
comparison
equal
deleted
inserted
replaced
37186:297da727ee2b | 37187:db6c0aa280ff |
---|---|
91 int64_t p; | 91 int64_t p; |
92 | 92 |
93 p = bd_seek(b->bd, pos); | 93 p = bd_seek(b->bd, pos); |
94 // bd_seek does not say what happens on errors, | 94 // bd_seek does not say what happens on errors, |
95 // so be extra paranoid. | 95 // so be extra paranoid. |
96 if (p < 0 || p != pos) { | 96 // bd_seek also does not seek exactly to the requested |
97 // position, so allow for some fuzz. | |
98 if (p < 0 || p > pos || p + 20*1024*1024 < pos) { | |
97 s->pos = bd_tell(b->bd); | 99 s->pos = bd_tell(b->bd); |
98 return 0; | 100 return 0; |
99 } | 101 } |
100 | 102 |
101 s->pos = p; | 103 s->pos = p; |