Open wushanchao opened 1 week ago
Error: "Decoder not configured"
means a data
packet has arrived before configuration
packets.
But I believe in this situation, it's a data
packet arrived after dispose
is called.
It's safe to ignore the error, or stop the piping before disposing the decoder:
const abortController = new AbortController();
const decoder = new TinyH264Decoder();
videoStream
// .pipeThrough inspect stream to get video size
.pipeTo(decoder.writable, {
signal: abortController.signal,
})
.catch((e) => {
if (abortController.signal.aborted) {
return;
}
console.error(e);
});
// when stopping
abortController.abort();
decoder.dispose();
Issue Checklist
Library version
0.0.21
Environment
win10,ios,android,chrome106
Device
pc, iPhone 17 ,Android 13
Describe the bug
When I disconnect, that is, when I execute the code 'STATE.stop();', the console occasionally throws an error saying 'Decoder not configured'.
Steps to reproduce
other tips