diff options
author | Claudio Ciccani <klan@users.sourceforge.net> | 2006-12-19 11:15:14 +0000 |
---|---|---|
committer | Claudio Ciccani <klan@users.sourceforge.net> | 2006-12-19 11:15:14 +0000 |
commit | 2cef6b4c46d7c84dfc4d8bad98731728b33bd9b9 (patch) | |
tree | 378367163071f2118c99b46e036a214dba46189f | |
parent | 25665d389818fca81eefaf83b217c0061b482551 (diff) | |
download | xine-lib-2cef6b4c46d7c84dfc4d8bad98731728b33bd9b9.tar.gz xine-lib-2cef6b4c46d7c84dfc4d8bad98731728b33bd9b9.tar.bz2 |
Privilege "max_bitrate" over "length" to compute the byterate
(because the file may be truncated).
CVS patchset: 8423
CVS date: 2006/12/19 11:15:14
-rw-r--r-- | src/demuxers/demux_asf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index ba31d6e51..c4c873515 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.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_asf.c,v 1.188 2006/11/29 21:26:52 dgp85 Exp $ + * $Id: demux_asf.c,v 1.189 2006/12/19 11:15:14 klan Exp $ * * demultiplexer for asf streams * @@ -408,7 +408,9 @@ static int asf_read_header (demux_asf_t *this) { this->length = 0; /* compute average byterate (needed for seeking) */ - if (this->length) + if (this->asf_header->file->max_bitrate) + this->rate = this->asf_header->file->max_bitrate >> 3; + else if (this->length) this->rate = (int64_t) this->input->get_length(this->input) * 1000 / this->length; _x_stream_info_set(this->stream, XINE_STREAM_INFO_BITRATE, this->asf_header->file->max_bitrate); |