decoder/flac: calculate bit rate in flac_common_write()

Removed the "bit_rate" attribute from the flac_data struct.  Pass the
number of bytes since the last call to flac_common_write(), and let
it calculate the bit rate.
This commit is contained in:
Max Kellermann
2009-11-11 19:52:14 +01:00
parent 7b13776f2d
commit d35efddd65
4 changed files with 25 additions and 17 deletions

View File

@@ -161,7 +161,7 @@ oggflac_write_cb(G_GNUC_UNUSED const OggFLAC__SeekableStreamDecoder *decoder,
time_change = ((float)samples) / frame->header.sample_rate;
data->time += time_change;
return flac_common_write(data, frame, buf);
return flac_common_write(data, frame, buf, 0);
}
/* used by TagDup */