summaryrefslogtreecommitdiff
path: root/libavformat/swf.c
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2007-02-25 14:13:12 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2007-02-25 14:13:12 +0000
commit950d94ad3b232d6e4ee1ad1a1f60364f8e0dfbda (patch)
treea4e762ce4e28f8b6b6c501a2de9a16042773b16c /libavformat/swf.c
parentadcec46a836ae6843953cff70407483eb0750159 (diff)
use AV_RB32, swf_mp3_info may be replaced with mpa_decoder_header
Originally committed as revision 8123 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/swf.c')
-rw-r--r--libavformat/swf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/swf.c b/libavformat/swf.c
index 3195f8c58a..703aa6589c 100644
--- a/libavformat/swf.c
+++ b/libavformat/swf.c
@@ -118,8 +118,7 @@ static const int sBitsPerSlot[3] = {
static int swf_mp3_info(void *data, int *byteSize, int *samplesPerFrame, int *sampleRate, int *isMono )
{
- uint8_t *dataTmp = (uint8_t *)data;
- uint32_t header = ( (uint32_t)dataTmp[0] << 24 ) | ( (uint32_t)dataTmp[1] << 16 ) | ( (uint32_t)dataTmp[2] << 8 ) | (uint32_t)dataTmp[3];
+ uint32_t header = AV_RB32(data);
int layerID = 3 - ((header >> 17) & 0x03);
int bitRateID = ((header >> 12) & 0x0f);
int sampleRateID = ((header >> 10) & 0x03);