diff options
Diffstat (limited to 'src/demuxers/demux_snd.c')
-rw-r--r-- | src/demuxers/demux_snd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/demuxers/demux_snd.c b/src/demuxers/demux_snd.c index ea7e9d901..e1fcdf399 100644 --- a/src/demuxers/demux_snd.c +++ b/src/demuxers/demux_snd.c @@ -21,7 +21,7 @@ /* * SND/AU File Demuxer by Mike Melanson (melanson@pcisys.net) * - * $Id: demux_snd.c,v 1.38 2004/01/09 01:26:33 miguelfreitas Exp $ + * $Id: demux_snd.c,v 1.39 2004/06/13 21:28:54 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -165,15 +165,15 @@ static int demux_snd_send_chunk(demux_plugin_t *this_gen) { current_pts /= this->audio_bytes_per_second; if (this->seek_flag) { - _x_demux_control_newpts(this->stream, current_pts, 0); + _x_demux_control_newpts(this->stream, current_pts, BUF_FLAG_SEEK); this->seek_flag = 0; } while (remaining_sample_bytes) { buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo); buf->type = this->audio_type; - buf->extra_info->input_pos = current_file_pos; - buf->extra_info->input_length = this->data_size; + if( this->data_size ) + buf->extra_info->input_normpos = (int)( (double) current_file_pos * 65535 / this->data_size); buf->extra_info->input_time = current_pts / 90; buf->pts = current_pts; @@ -236,6 +236,8 @@ static void demux_snd_send_headers(demux_plugin_t *this_gen) { static int demux_snd_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing) { demux_snd_t *this = (demux_snd_t *) this_gen; + start_pos = (off_t) ( (double) start_pos / 65535 * + this->data_size ); this->seek_flag = 1; this->status = DEMUX_OK; |