diff options
author | 2010-07-10 23:11:45 +0000 | |
---|---|---|
committer | 2010-11-02 04:14:43 +0200 | |
commit | ce19a13986366faae75408fd55914205d0e52180 (patch) | |
tree | 9385a9a4c3bcecf4bbf7bb0b5153f7b83ae81ae2 /libmpdemux/demux_audio.c | |
parent | 5f65cbcc07ae3a47155de5d3c825e6a248065f9f (diff) |
asfheader, demux_audio: Remove some pointless be2me/le2me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31685 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_audio.c')
-rw-r--r-- | libmpdemux/demux_audio.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c index 35844a344f..38f1d2afd2 100644 --- a/libmpdemux/demux_audio.c +++ b/libmpdemux/demux_audio.c @@ -481,13 +481,12 @@ static int demux_audio_open(demuxer_t* demuxer) { if (demuxer->movi_end > demuxer->movi_start) { // try to find out approx. bitrate int64_t size = demuxer->movi_end - demuxer->movi_start; - int64_t num_samples = 0; - int32_t srate = 0; + int64_t num_samples; + int32_t srate; stream_skip(s, 14); - stream_read(s, (char *)&srate, 3); - srate = be2me_32(srate) >> 12; - stream_read(s, (char *)&num_samples, 5); - num_samples = (be2me_64(num_samples) >> 24) & 0xfffffffffULL; + srate = stream_read_int24(s) >> 4; + num_samples = stream_read_int24(s) << 16; + num_samples |= stream_read_word(s); if (num_samples && srate) sh_audio->i_bps = size * srate / num_samples; } |