summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2011-10-18 15:35:19 +0300
committerPetri Hintukainen <phintuka@users.sourceforge.net>2011-10-18 15:35:19 +0300
commit720c9e8623e64466c419a48506822d527f149715 (patch)
tree5fcb968c7936f909a54d145e0be61a2d04f9e51c /src
parent6fa4eea31e772669253d1c474abba11e2ab78837 (diff)
downloadxine-lib-720c9e8623e64466c419a48506822d527f149715.tar.gz
xine-lib-720c9e8623e64466c419a48506822d527f149715.tar.bz2
demux_ts.c: Use input->seek_time() when available.
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_ts.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c
index 99c2074d0..98808ec62 100644
--- a/src/demuxers/demux_ts.c
+++ b/src/demuxers/demux_ts.c
@@ -2301,10 +2301,17 @@ static int demux_ts_seek (demux_plugin_t *this_gen,
if (this->input->get_capabilities(this->input) & INPUT_CAP_SEEKABLE) {
if ((!start_pos) && (start_time)) {
- start_pos = (int64_t)start_time * this->rate / 1000;
- }
- 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 = (int64_t)start_time * this->rate / 1000;
+ this->input->seek (this->input, start_pos, SEEK_SET);
+ }
+
+ } else {
+ this->input->seek (this->input, start_pos, SEEK_SET);
+ }
}
this->send_newpts = 1;