changeset 1815:6b76db126b72 libavformat

use AV_RB32, swf_mp3_info may be replaced with mpa_decoder_header
author alex
date Sun, 25 Feb 2007 14:13:12 +0000
parents d431b26ff5ef
children 27ae0787cc6c
files swf.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/swf.c	Sat Feb 24 01:51:37 2007 +0000
+++ b/swf.c	Sun Feb 25 14:13:12 2007 +0000
@@ -118,8 +118,7 @@
 
 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);