[Ffmpeg-cvslog] r8123 - trunk/libavformat/swf.c
alex
subversion
Sun Feb 25 15:13:13 CET 2007
Author: alex
Date: Sun Feb 25 15:13:12 2007
New Revision: 8123
Modified:
trunk/libavformat/swf.c
Log:
use AV_RB32, swf_mp3_info may be replaced with mpa_decoder_header
Modified: trunk/libavformat/swf.c
==============================================================================
--- trunk/libavformat/swf.c (original)
+++ trunk/libavformat/swf.c Sun Feb 25 15:13:12 2007
@@ -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);
More information about the ffmpeg-cvslog
mailing list