summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_mod.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2004-06-13 21:28:52 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2004-06-13 21:28:52 +0000
commitf85a943fdff3f12db8faf4b84e4f63aafdc60db3 (patch)
treee16cc52e6b9a9548714a1ee31a5265ff34127467 /src/demuxers/demux_mod.c
parent62f8ce9ec67fb85da1023b5db90a0a5f1609cff7 (diff)
downloadxine-lib-f85a943fdff3f12db8faf4b84e4f63aafdc60db3.tar.gz
xine-lib-f85a943fdff3f12db8faf4b84e4f63aafdc60db3.tar.bz2
implement steps 1, 2, 3 and 4 of the seeking proposal:
http://article.gmane.org/gmane.comp.video.xine.devel/9532 it is now up to demuxers to decide what the 0..65535 position means. demuxers tested: ogg, voc, flac, rm, asf, vqa, vob, avi, y4m, au, mov, ts, mp3, mpg, wav, ra, mve CVS patchset: 6686 CVS date: 2004/06/13 21:28:52
Diffstat (limited to 'src/demuxers/demux_mod.c')
-rw-r--r--src/demuxers/demux_mod.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/demuxers/demux_mod.c b/src/demuxers/demux_mod.c
index 4d96dee81..185ef5c97 100644
--- a/src/demuxers/demux_mod.c
+++ b/src/demuxers/demux_mod.c
@@ -147,17 +147,11 @@ static int demux_mod_send_chunk(demux_plugin_t *this_gen) {
buf->free_buffer(buf);
}
else {
- int64_t input_pos;
-
buf->size = mlen;
buf->pts = this->current_pts;
buf->extra_info->input_time = buf->pts / 90;
- buf->extra_info->input_length = this->input->get_length(this->input);
- input_pos = buf->extra_info->input_length;
- input_pos *= buf->extra_info->input_time;
- input_pos /= this->mod_length;
- buf->extra_info->input_pos = input_pos;
+ buf->extra_info->input_normpos = buf->extra_info->input_time * 65535 / this->mod_length;
buf->decoder_flags = BUF_FLAG_FRAME_END;
if (this->seek_flag) {
@@ -216,11 +210,10 @@ static int demux_mod_seek (demux_plugin_t *this_gen,
demux_mod_t *this = (demux_mod_t *) this_gen;
int64_t seek_millis;
-
if (start_pos) {
seek_millis = this->mod_length;
seek_millis *= start_pos;
- seek_millis /= this->input->get_length(this->input);
+ seek_millis /= 65535;
} else {
seek_millis = start_time;
}