File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/AudioTools/AudioCodecs Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ class MultiDecoder : public AudioDecoder {
88
88
if (mime != nullptr ) {
89
89
if (!selectDecoder (mime)) {
90
90
LOGE (" The decoder could not be found for %s" , mime);
91
+ actual_decoder.decoder = &nop;
92
+ actual_decoder.is_open = true ;
91
93
}
92
94
}
93
95
is_first = false ;
@@ -103,8 +105,10 @@ class MultiDecoder : public AudioDecoder {
103
105
mime_detector.setMimeDetector (mimeDetectCallback);
104
106
}
105
107
106
- virtual operator bool () { return is_first || actual_decoder.is_open ; };
107
-
108
+ virtual operator bool () {
109
+ if (actual_decoder.decoder == &nop) return false ;
110
+ return is_first || actual_decoder.is_open ;
111
+ };
108
112
109
113
protected:
110
114
struct DecoderInfo {
@@ -119,6 +123,7 @@ class MultiDecoder : public AudioDecoder {
119
123
} actual_decoder;
120
124
Vector<DecoderInfo> decoders{0 };
121
125
MimeDetector mime_detector;
126
+ CodecNOP nop;
122
127
bool is_first = true ;
123
128
};
124
129
You can’t perform that action at this time.
0 commit comments