diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2007-07-10 17:50:44 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2007-07-10 17:50:44 +0000 |
commit | f79488d426c3ac442b250ec1643a19d011f8594a (patch) | |
tree | 7b507ab57f53af7aeb9cc7a90f19917a42c39954 | |
parent | 99439cb72c51725aaf412d84049804a54ea5754b (diff) | |
download | ffmpeg-f79488d426c3ac442b250ec1643a19d011f8594a.tar.gz |
Use proper bytestream functions
Originally committed as revision 9580 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/alac.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c index 5af5da34a1..a466b36dcc 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -55,6 +55,7 @@ #include "avcodec.h" #include "bitstream.h" +#include "bytestream.h" #define ALAC_EXTRADATA_SIZE 36 #define MAX_CHANNELS 2 @@ -116,22 +117,22 @@ static int alac_set_info(ALACContext *alac) av_log(alac->avctx, AV_LOG_ERROR, "setinfo_max_samples_per_frame too large\n"); return -1; } - alac->setinfo_max_samples_per_frame = AV_RB32(ptr); /* buffer size / 2 ? */ - ptr += 4; + + /* buffer size / 2 ? */ + alac->setinfo_max_samples_per_frame = bytestream_get_be32(&ptr); alac->setinfo_7a = *ptr++; alac->setinfo_sample_size = *ptr++; alac->setinfo_rice_historymult = *ptr++; alac->setinfo_rice_initialhistory = *ptr++; alac->setinfo_rice_kmodifier = *ptr++; alac->setinfo_7f = *ptr++; // channels? - alac->setinfo_80 = AV_RB16(ptr); - ptr += 2; - alac->setinfo_82 = AV_RB32(ptr); // max coded frame size - ptr += 4; - alac->setinfo_86 = AV_RB32(ptr); // bitrate ? - ptr += 4; - alac->setinfo_8a_rate = AV_RB32(ptr); // samplerate - ptr += 4; + alac->setinfo_80 = bytestream_get_be16(&ptr); + /* max coded frame size */ + alac->setinfo_82 = bytestream_get_be32(&ptr); + /* bitrate ? */ + alac->setinfo_86 = bytestream_get_be32(&ptr); + /* samplerate */ + alac->setinfo_8a_rate = bytestream_get_be32(&ptr); allocate_buffers(alac); |