diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2002-05-16 22:18:39 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2002-05-16 22:18:39 +0000 |
commit | 05cf126ade3bc9c5e43395c665782a47a8f47563 (patch) | |
tree | 5a0eb684a53c4d6a0844baa594461e0fb4b0b74e /src | |
parent | e563884bf16b1652db2feb5161ed362f411d7b92 (diff) | |
download | xine-lib-05cf126ade3bc9c5e43395c665782a47a8f47563.tar.gz xine-lib-05cf126ade3bc9c5e43395c665782a47a8f47563.tar.bz2 |
Send a new pts when seeking. It enables "fast" seeking.
CVS patchset: 1900
CVS date: 2002/05/16 22:18:39
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_mpgaudio.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 0fba00ff6..1293482a0 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpgaudio.c,v 1.41 2002/05/15 22:52:14 tmattern Exp $ + * $Id: demux_mpgaudio.c,v 1.42 2002/05/16 22:18:39 tmattern Exp $ * * demultiplexer for mpeg audio (i.e. mp3) streams * @@ -354,8 +354,22 @@ static void demux_mpgaudio_start (demux_plugin_t *this_gen, start_pos = start_time * this->input->get_length(this->input) / this->stream_length; - this->input->seek (this->input, start_pos, SEEK_SET); + + /* send a new pts */ + if( this->thread_running ) { + buf = this->video_fifo->buffer_pool_alloc (this->video_fifo); + buf->type = BUF_CONTROL_NEWPTS; + buf->disc_off = start_pos /90; + this->video_fifo->put (this->video_fifo, buf); + + if (this->audio_fifo) { + buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo); + buf->type = BUF_CONTROL_NEWPTS; + buf->disc_off = start_pos /90; + this->audio_fifo->put (this->audio_fifo, buf); + } + } } if( !this->thread_running ) { |