# HG changeset patch # User mru # Date 1192057174 0 # Node ID 9e91148f1d444ff66329293a0472288c60d82eba # Parent f9cfd91f344a25a38dca266c6161fa4666596094 use bytestream_get_* in vorbis_header() diff -r f9cfd91f344a -r 9e91148f1d44 oggparsevorbis.c --- a/oggparsevorbis.c Wed Oct 10 22:59:31 2007 +0000 +++ b/oggparsevorbis.c Wed Oct 10 22:59:34 2007 +0000 @@ -25,6 +25,7 @@ #include #include "avformat.h" #include "bitstream.h" +#include "bytestream.h" #include "bswap.h" #include "ogg2.h" #include "avstring.h" @@ -187,10 +188,10 @@ 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;