[FFmpeg-cvslog] r10706 - trunk/libavformat/oggparsevorbis.c
mru
subversion
Thu Oct 11 00:59:34 CEST 2007
Author: mru
Date: Thu Oct 11 00:59:34 2007
New Revision: 10706
Log:
use bytestream_get_* in vorbis_header()
Modified:
trunk/libavformat/oggparsevorbis.c
Modified: trunk/libavformat/oggparsevorbis.c
==============================================================================
--- trunk/libavformat/oggparsevorbis.c (original)
+++ trunk/libavformat/oggparsevorbis.c Thu Oct 11 00:59:34 2007
@@ -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
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;
More information about the ffmpeg-cvslog
mailing list