Browse Source

aac_parser: fix strict aliasing violation

Originally committed as revision 15595 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Måns Rullgård 16 years ago
parent
commit
57bb0da679
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavcodec/aac_parser.c

+ 3
- 2
libavcodec/aac_parser.c View File

@@ -32,9 +32,10 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
{ {
GetBitContext bits; GetBitContext bits;
int size, rdb, ch, sr; 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) if(get_bits(&bits, 12) != 0xfff)
return 0; return 0;


Loading…
Cancel
Save