You need to sign in or sign up before continuing.
Commit 475ac76a authored by Max Kellermann's avatar Max Kellermann

decoder/flac: late "total_frames" initialization

parent 79d4f867
......@@ -33,7 +33,7 @@ flac_data::flac_data(Decoder &_decoder,
InputStream &_input_stream)
:FlacInput(_input_stream, &_decoder),
initialized(false), unsupported(false),
total_frames(0), position(0),
position(0),
decoder(_decoder), input_stream(_input_stream)
{
}
......@@ -142,6 +142,7 @@ flac_got_first_frame(struct flac_data *data, const FLAC__FrameHeader *header)
data->input_stream.IsSeekable(),
duration);
data->total_frames = 0; /* unkown duration */
data->initialized = true;
return true;
......
......@@ -56,6 +56,8 @@ struct flac_data : public FlacInput {
/**
* The total number of frames in this song. 0 means unknown.
*
* This attribute is defined if "initialized" is true.
*/
FLAC__uint64 total_frames;
......
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