Commit 79d4f867 authored by Max Kellermann's avatar Max Kellermann

decoder/flac: remove "duration" parameter from flac_decoder_initialize()

It's always 0.
parent e42eed4d
......@@ -77,8 +77,6 @@ flac_got_stream_info(struct flac_data *data,
}
data->frame_size = data->audio_format.GetFrameSize();
if (data->total_frames == 0)
data->total_frames = stream_info->total_samples;
data->initialized = true;
......
......@@ -132,11 +132,8 @@ flac_decoder_new(void)
}
static bool
flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd,
FLAC__uint64 duration)
flac_decoder_initialize(struct flac_data *data, FLAC__StreamDecoder *sd)
{
data->total_frames = duration;
if (!FLAC__stream_decoder_process_until_end_of_metadata(sd)) {
LogWarning(flac_domain, "problem reading metadata");
return false;
......@@ -295,7 +292,7 @@ flac_decode_internal(Decoder &decoder,
return;
}
if (!flac_decoder_initialize(&data, flac_dec, 0)) {
if (!flac_decoder_initialize(&data, flac_dec)) {
FLAC__stream_decoder_finish(flac_dec);
FLAC__stream_decoder_delete(flac_dec);
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment