diff options
author | Måns Rullgård <mans@mansr.com> | 2007-10-10 22:59:34 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2007-10-10 22:59:34 +0000 |
commit | 739587bf0419a860384bfb1ac0ad768634c1563f (patch) | |
tree | ae6bf7142b203c2776c0ce20748b51629bfb8fa1 /libavformat/oggparsevorbis.c | |
parent | f5475e1b38a37c6da2e26097242cf82a2b1a9ee9 (diff) | |
download | ffmpeg-739587bf0419a860384bfb1ac0ad768634c1563f.tar.gz |
use bytestream_get_* in vorbis_header()
Originally committed as revision 10706 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/oggparsevorbis.c')
-rw-r--r-- | libavformat/oggparsevorbis.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 8d09cbd487..f134d6d6e7 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -25,6 +25,7 @@ #include <stdlib.h> #include "avformat.h" #include "bitstream.h" +#include "bytestream.h" #include "bswap.h" #include "ogg2.h" #include "avstring.h" @@ -187,10 +188,10 @@ vorbis_header (AVFormatContext * s, int idx) if (os->psize != 30) return -1; - st->codec->channels = *p++; - st->codec->sample_rate = AV_RL32(p); - p += 8; //skip maximum and and nominal bitrate - st->codec->bit_rate = AV_RL32(p); //Minimum bitrate + st->codec->channels = bytestream_get_byte(&p); + st->codec->sample_rate = bytestream_get_le32(&p); + p += 4; // skip maximum bitrate + st->codec->bit_rate = bytestream_get_le32(&p); // nominal bitrate st->codec->codec_type = CODEC_TYPE_AUDIO; st->codec->codec_id = CODEC_ID_VORBIS; |