double tpfbs[] = { 0, 384.0f, 1152.0f, 1152.0f };
frequency = freqtab[version][freqindex];
- tpf = tpfbs[layer] / (double) frequency;
- if (version == MPEG_VERSION2_5 || version == MPEG_VERSION2)
- tpf /= 2;
if (frequency == 0)
return 0;
+ tpf = tpfbs[layer] / (double) frequency;
+ if (version == MPEG_VERSION2_5 || version == MPEG_VERSION2)
+ tpf /= 2;
+
/* Channel mode (stereo/mono) */
int chmode = (mpegheader & 0xc0) >> 6;
/* calculate position of Xing VBR header */