summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2011-06-19 21:17:55 +0000
committerphintuka <phintuka>2011-06-19 21:17:55 +0000
commit07afc4f5201eb8dfb6b49fb37650a7b62c4df014 (patch)
treef3cec41fdf76ce84d9419ac3ea86169fcf8c843d
parent0f23b0aa5f3526ab09caab665337c0ed3217caec (diff)
downloadxineliboutput-07afc4f5201eb8dfb6b49fb37650a7b62c4df014.tar.gz
xineliboutput-07afc4f5201eb8dfb6b49fb37650a7b62c4df014.tar.bz2
Use input->seek_time() when available. MAkes seeking in BluRays more accurate.
-rw-r--r--xine/BluRay/demux_ts.c15
1 files 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;