changeset 8018:e381bf921a88 libavcodec

aac_parser: fix strict aliasing violation
author mru
date Sat, 11 Oct 2008 11:21:45 +0000
parents cecd3150f82b
children dea517f771aa
files aac_parser.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/aac_parser.c	Thu Oct 09 18:36:49 2008 +0000
+++ b/aac_parser.c	Sat Oct 11 11:21:45 2008 +0000
@@ -32,9 +32,10 @@
 {
     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;