diff options
author | Måns Rullgård <mans@mansr.com> | 2008-10-11 11:21:45 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-10-11 11:21:45 +0000 |
commit | 57bb0da67996e1fe389b36693591909acd82dfb8 (patch) | |
tree | af85dc3158752917593b5730864b17b358b66496 /libavcodec/aac_parser.c | |
parent | bc574408dc011943b82de012451f95266bed9989 (diff) | |
download | ffmpeg-57bb0da67996e1fe389b36693591909acd82dfb8.tar.gz |
aac_parser: fix strict aliasing violation
Originally committed as revision 15595 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aac_parser.c')
-rw-r--r-- | libavcodec/aac_parser.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c index db2c697725..1d75e1e859 100644 --- a/libavcodec/aac_parser.c +++ b/libavcodec/aac_parser.c @@ -32,9 +32,10 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info, { GetBitContext bits; int size, rdb, ch, sr; - uint64_t tmp = be2me_64(state); + uint8_t tmp[8]; - init_get_bits(&bits, ((uint8_t *)&tmp)+8-AAC_HEADER_SIZE, AAC_HEADER_SIZE * 8); + AV_WB64(tmp, state); + init_get_bits(&bits, tmp+8-AAC_HEADER_SIZE, AAC_HEADER_SIZE * 8); if(get_bits(&bits, 12) != 0xfff) return 0; |