Commit 69ded750 authored by mru's avatar mru

AC3: fix strict aliasing violation in parser

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16181 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 16ccb4ae
...@@ -158,11 +158,14 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info, ...@@ -158,11 +158,14 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,
int *need_next_header, int *new_frame_start) int *need_next_header, int *new_frame_start)
{ {
int err; int err;
uint64_t tmp = be2me_64(state); union {
uint64_t u64;
uint8_t u8[8];
} tmp = { be2me_64(state) };
AC3HeaderInfo hdr; AC3HeaderInfo hdr;
GetBitContext gbc; GetBitContext gbc;
init_get_bits(&gbc, ((uint8_t *)&tmp)+8-AC3_HEADER_SIZE, 54); init_get_bits(&gbc, tmp.u8+8-AC3_HEADER_SIZE, 54);
err = ff_ac3_parse_header(&gbc, &hdr); err = ff_ac3_parse_header(&gbc, &hdr);
if(err < 0) if(err < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment