We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ce1898 commit cc4ed39Copy full SHA for cc4ed39
src/AudioCodecs/CodecFLAC.h
@@ -60,6 +60,7 @@ class FLACDecoder : public StreamingDecoder {
60
61
bool begin() {
62
TRACEI();
63
+ is_active = false;
64
if (decoder == nullptr) {
65
if ((decoder = FLAC__stream_decoder_new()) == NULL) {
66
LOGE("ERROR: allocating decoder");
@@ -70,9 +71,9 @@ class FLACDecoder : public StreamingDecoder {
70
71
}
72
73
// if it is already active we close it
- if (is_active){
74
+ auto state = FLAC__stream_decoder_get_state(decoder);
75
+ if (state != FLAC__STREAM_DECODER_UNINITIALIZED){
76
FLAC__stream_decoder_finish(decoder);
- is_active = false;
77
78
79
// deactivate md5 checking
0 commit comments