X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fac3_parser.c;h=ba171653ef63a65f0017a2d4d2ad136afd9c3a65;hb=3105e970503e77f11a9d8139d38b73abe25907a9;hp=1e203ae6ac233df247d799c562dc3f41a45c680d;hpb=c6892f59eb0e9f2a9ec1f55b21a5841a60540e1f;p=ffmpeg diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c index 1e203ae6ac2..ba171653ef6 100644 --- a/libavcodec/ac3_parser.c +++ b/libavcodec/ac3_parser.c @@ -201,6 +201,12 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info, AC3HeaderInfo hdr; GetBitContext gbc; + if (tmp.u8[1] == 0x77 && tmp.u8[2] == 0x0b) { + FFSWAP(uint8_t, tmp.u8[1], tmp.u8[2]); + FFSWAP(uint8_t, tmp.u8[3], tmp.u8[4]); + FFSWAP(uint8_t, tmp.u8[5], tmp.u8[6]); + } + init_get_bits(&gbc, tmp.u8+8-AC3_HEADER_SIZE, 54); err = ff_ac3_parse_header(&gbc, &hdr);