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 7d5595b commit f55df64Copy full SHA for f55df64
src/AudioTools/AudioCodecs/CodecCopy.h
@@ -79,7 +79,13 @@ class CopyEncoder : public AudioEncoder {
79
80
void end() {}
81
82
- size_t write(const uint8_t *data, size_t len) { return pt_print->write((uint8_t*)data,len); }
+ size_t write(const uint8_t *data, size_t len) {
83
+ if (pt_print == nullptr) {
84
+ LOGE("No output stream defined for CopyDecoder");
85
+ return 0;
86
+ }
87
+ return pt_print->write((uint8_t*)data,len);
88
89
90
operator bool() { return true; }
91
0 commit comments