- /* get codec params from STREAMINFO header */
- avpriv_flac_parse_streaminfo(st->codec, &si, st->codec->extradata);
+ /* get sample rate and sample count from STREAMINFO header;
+ * other parameters will be extracted by the parser */
+ samplerate = AV_RB24(st->codec->extradata + 10) >> 4;
+ samples = (AV_RB64(st->codec->extradata + 13) >> 24) & ((1ULL << 36) - 1);