diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-10 21:10:50 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-10 21:10:50 +0000 |
commit | 77ecf6954f81c3e1b9589d2d14b79f839022e690 (patch) | |
tree | f8f08e5eeb5d138ac4f4729b0d33f8b3a86792d5 /src/demuxers/demux_real.c | |
parent | ba1dc3c25af7a2c0ab705ff7dfb4286f21e4b931 (diff) | |
download | xine-lib-77ecf6954f81c3e1b9589d2d14b79f839022e690.tar.gz xine-lib-77ecf6954f81c3e1b9589d2d14b79f839022e690.tar.bz2 |
have length in miliseconds too
fix some intermediate calculation
CVS patchset: 3856
CVS date: 2003/01/10 21:10:50
Diffstat (limited to 'src/demuxers/demux_real.c')
-rw-r--r-- | src/demuxers/demux_real.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index eb06d1b3c..fc49ade20 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -28,7 +28,7 @@ * * Based on FFmpeg's libav/rm.c. * - * $Id: demux_real.c,v 1.32 2003/01/10 11:57:17 miguelfreitas Exp $ + * $Id: demux_real.c,v 1.33 2003/01/10 21:11:08 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -786,8 +786,8 @@ static int demux_real_send_chunk(demux_plugin_t *this_gen) { buf->pts = pts; buf->extra_info->input_pos = this->input->get_current_pos (this->input); - buf->extra_info->input_time = buf->extra_info->input_pos * 8 * 1000 / - this->avg_bitrate ; + buf->extra_info->input_time = (int)((int64_t)buf->extra_info->input_pos + * 8 * 1000 / this->avg_bitrate); buf->type = this->video_buf_type; check_newpts (this, pts, PTS_VIDEO, 0); @@ -871,8 +871,8 @@ static int demux_real_send_chunk(demux_plugin_t *this_gen) { buf->content = buf->mem; buf->pts = pts; buf->extra_info->input_pos = this->input->get_current_pos (this->input); - buf->extra_info->input_time = buf->extra_info->input_pos * 8 * 1000 / - this->avg_bitrate ; + buf->extra_info->input_time = (int)((int64_t)buf->extra_info->input_pos + * 8 * 1000 / this->avg_bitrate); buf->type = this->audio_buf_type; buf->decoder_flags = 0; buf->size = size; @@ -1022,7 +1022,7 @@ static int demux_real_get_stream_length (demux_plugin_t *this_gen) { demux_real_t *this = (demux_real_t *) this_gen; /* duration is stored in the file as milliseconds */ - return this->duration / 1000; + return this->duration; } static uint32_t demux_real_get_capabilities(demux_plugin_t *this_gen) { |