Commit 0c05ec8d authored by mru's avatar mru

use bytestream_get_* in vorbis_header()


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10706 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 50e47798
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "avformat.h" #include "avformat.h"
#include "bitstream.h" #include "bitstream.h"
#include "bytestream.h"
#include "bswap.h" #include "bswap.h"
#include "ogg2.h" #include "ogg2.h"
#include "avstring.h" #include "avstring.h"
...@@ -187,10 +188,10 @@ vorbis_header (AVFormatContext * s, int idx) ...@@ -187,10 +188,10 @@ vorbis_header (AVFormatContext * s, int idx)
if (os->psize != 30) if (os->psize != 30)
return -1; return -1;
st->codec->channels = *p++; st->codec->channels = bytestream_get_byte(&p);
st->codec->sample_rate = AV_RL32(p); st->codec->sample_rate = bytestream_get_le32(&p);
p += 8; //skip maximum and and nominal bitrate p += 4; // skip maximum bitrate
st->codec->bit_rate = AV_RL32(p); //Minimum bitrate st->codec->bit_rate = bytestream_get_le32(&p); // nominal bitrate
st->codec->codec_type = CODEC_TYPE_AUDIO; st->codec->codec_type = CODEC_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_VORBIS; st->codec->codec_id = CODEC_ID_VORBIS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment