Skip to content
Snippets Groups Projects
Commit cb56b440 authored by Måns Rullgård's avatar Måns Rullgård
Browse files

AAC: fix strict aliasing violation in parser

Originally committed as revision 16180 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a2fc0f6a
No related branches found
No related tags found
No related merge requests found
...@@ -32,10 +32,13 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info, ...@@ -32,10 +32,13 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
{ {
GetBitContext bits; GetBitContext bits;
int size, rdb, ch, sr; int size, rdb, ch, sr;
uint8_t tmp[8]; union {
uint64_t u64;
uint8_t u8[8];
} tmp;
AV_WB64(tmp, state); tmp.u64 = be2me_64(state);
init_get_bits(&bits, tmp+8-AAC_HEADER_SIZE, AAC_HEADER_SIZE * 8); init_get_bits(&bits, tmp.u8+8-AAC_HEADER_SIZE, AAC_HEADER_SIZE * 8);
if(get_bits(&bits, 12) != 0xfff) if(get_bits(&bits, 12) != 0xfff)
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment