Loading media/libstagefright/MP3Extractor.cpp +10 −9 Original line number Original line Diff line number Diff line Loading @@ -33,6 +33,10 @@ namespace android { namespace android { // Everything must match except for // protection, bitrate, padding, private bits and mode extension. static const uint32_t kMask = 0xfffe0ccf; static bool get_mp3_frame_size( static bool get_mp3_frame_size( uint32_t header, size_t *frame_size, uint32_t header, size_t *frame_size, int *out_sampling_rate = NULL, int *out_channels = NULL, int *out_sampling_rate = NULL, int *out_channels = NULL, Loading Loading @@ -199,10 +203,6 @@ static bool Resync( } } } } // Everything must match except for // protection, bitrate, padding, private bits and mode extension. const uint32_t kMask = 0xfffe0ccf; const size_t kMaxFrameSize = 4096; const size_t kMaxFrameSize = 4096; uint8_t *buffer = new uint8_t[kMaxFrameSize]; uint8_t *buffer = new uint8_t[kMaxFrameSize]; Loading Loading @@ -490,7 +490,8 @@ status_t MP3Source::read( uint32_t header = U32_AT((const uint8_t *)buffer->data()); uint32_t header = U32_AT((const uint8_t *)buffer->data()); if (get_mp3_frame_size(header, &frame_size)) { if ((header & kMask) == (mFixedHeader & kMask) && get_mp3_frame_size(header, &frame_size)) { break; break; } } Loading Loading
media/libstagefright/MP3Extractor.cpp +10 −9 Original line number Original line Diff line number Diff line Loading @@ -33,6 +33,10 @@ namespace android { namespace android { // Everything must match except for // protection, bitrate, padding, private bits and mode extension. static const uint32_t kMask = 0xfffe0ccf; static bool get_mp3_frame_size( static bool get_mp3_frame_size( uint32_t header, size_t *frame_size, uint32_t header, size_t *frame_size, int *out_sampling_rate = NULL, int *out_channels = NULL, int *out_sampling_rate = NULL, int *out_channels = NULL, Loading Loading @@ -199,10 +203,6 @@ static bool Resync( } } } } // Everything must match except for // protection, bitrate, padding, private bits and mode extension. const uint32_t kMask = 0xfffe0ccf; const size_t kMaxFrameSize = 4096; const size_t kMaxFrameSize = 4096; uint8_t *buffer = new uint8_t[kMaxFrameSize]; uint8_t *buffer = new uint8_t[kMaxFrameSize]; Loading Loading @@ -490,7 +490,8 @@ status_t MP3Source::read( uint32_t header = U32_AT((const uint8_t *)buffer->data()); uint32_t header = U32_AT((const uint8_t *)buffer->data()); if (get_mp3_frame_size(header, &frame_size)) { if ((header & kMask) == (mFixedHeader & kMask) && get_mp3_frame_size(header, &frame_size)) { break; break; } } Loading