Without this fix, the computed duration of a frame can be slightly
larger than its actual duration. If this happens for many frames of
an mp3 file, the chunk size will be slightly too large, which leads
to buffer underruns during streaming.
if (ret < 0)
continue;
fl = ret;
if (ret < 0)
continue;
fl = ret;
+ tmp.tv_sec = fl - header.padding;
tmp.tv_usec = 0;
tv_divide(br * 125, &tmp, &cct);
tv_add(&cct, &total_time, &tmp);
tmp.tv_usec = 0;
tv_divide(br * 125, &tmp, &cct);
tv_add(&cct, &total_time, &tmp);