aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/aiffdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-12 01:25:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-12 01:25:37 +0100
commit7fad19a63dc52db4bf2bebbd9d261675956b1b34 (patch)
tree8997428f45d54f3177dc6cd208d0375daa6fe201 /libavformat/aiffdec.c
parent16abd687798bbf9192ba4954765e61de96065b8b (diff)
parent599b4c6efddaed33b1667c386b34b07729ba732b (diff)
downloadffmpeg-7fad19a63dc52db4bf2bebbd9d261675956b1b34.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: x86: cabac: replace explicit memory references with "m" operands avplay: don't request a stereo downmix wmapro: use av_float2int() lavc: avoid invalid memcpy() in avcodec_default_release_buffer() lavu: replace int/float punning functions lavfi: install libavfilter/vsrc_buffer.h Remove extraneous semicolons sdp: Restore the original mp4 format h264 extradata if converted rtpenc: Add support for mp4 format h264 rtpenc: Simplify code by introducing a separate end pointer movenc: Use the actual converted sample for RTP hinting Fix a bunch of common typos. Conflicts: doc/developer.texi doc/eval.texi doc/filters.texi doc/protocols.texi ffmpeg.c ffplay.c libavcodec/mpegvideo.h libavcodec/x86/cabac.h libavfilter/Makefile libavformat/avformat.h libavformat/cafdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/gxfenc.c libavformat/img2.c libavformat/movenc.c libavformat/mpegts.c libavformat/rtpenc_h264.c libavformat/utils.c libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/aiffdec.c')
-rw-r--r--libavformat/aiffdec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 66f8eefc75..e33bd57b7f 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -19,7 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/intfloat_readwrite.h"
+#include "libavutil/mathematics.h"
#include "libavutil/dict.h"
#include "avformat.h"
#include "internal.h"
@@ -90,7 +90,8 @@ static void get_meta(AVFormatContext *s, const char *key, int size)
static unsigned int get_aiff_header(AVIOContext *pb, AVCodecContext *codec,
int size, unsigned version)
{
- AVExtFloat ext;
+ int exp;
+ uint64_t val;
double sample_rate;
unsigned int num_frames;
@@ -101,8 +102,9 @@ static unsigned int get_aiff_header(AVIOContext *pb, AVCodecContext *codec,
num_frames = avio_rb32(pb);
codec->bits_per_coded_sample = avio_rb16(pb);
- avio_read(pb, (uint8_t*)&ext, sizeof(ext));/* Sample rate is in */
- sample_rate = av_ext2dbl(ext); /* 80 bits BE IEEE extended float */
+ exp = avio_rb16(pb);
+ val = avio_rb64(pb);
+ sample_rate = ldexp(val, exp - 16383 - 63);
codec->sample_rate = sample_rate;
size -= 18;