From 07afc4f5201eb8dfb6b49fb37650a7b62c4df014 Mon Sep 17 00:00:00 2001 From: phintuka Date: Sun, 19 Jun 2011 21:17:55 +0000 Subject: Use input->seek_time() when available. MAkes seeking in BluRays more accurate. --- xine/BluRay/demux_ts.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/xine/BluRay/demux_ts.c b/xine/BluRay/demux_ts.c index 0010831b..f1d6c9e7 100644 --- a/xine/BluRay/demux_ts.c +++ b/xine/BluRay/demux_ts.c @@ -2275,18 +2275,23 @@ static int demux_ts_seek (demux_plugin_t *this_gen, demux_ts_t *this = (demux_ts_t *) this_gen; int i; - start_time /= 1000; start_pos = (off_t) ( (double) start_pos / 65535 * this->input->get_length (this->input) ); if (this->input->get_capabilities(this->input) & INPUT_CAP_SEEKABLE) { if ((!start_pos) && (start_time)) { - start_pos = start_time; - start_pos *= this->rate; - } - this->input->seek (this->input, start_pos, SEEK_SET); + if (this->input->seek_time) { + this->input->seek_time (this->input, start_time, SEEK_SET); + } else { + start_pos = start_time / 1000; + start_pos *= this->rate; + this->input->seek (this->input, start_pos, SEEK_SET); + } + } else { + this->input->seek (this->input, start_pos, SEEK_SET); + } } this->send_newpts = 1; -- cgit v1.2.3