avcodec/ac3_parser: add avpriv_ac3_parse_header2() and use it in libavcodec