diff --git a/src/decoder/plugins/FlacCommon.cxx b/src/decoder/plugins/FlacCommon.cxx index a3b1e9184..8aa84201d 100644 --- a/src/decoder/plugins/FlacCommon.cxx +++ b/src/decoder/plugins/FlacCommon.cxx @@ -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; diff --git a/src/decoder/plugins/FlacCommon.hxx b/src/decoder/plugins/FlacCommon.hxx index b5de6974d..2d424cbe5 100644 --- a/src/decoder/plugins/FlacCommon.hxx +++ b/src/decoder/plugins/FlacCommon.hxx @@ -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;