Sometimes I see some behaviour I can't really explain, and triggers me to investigate.
For instance, I have a spanish radio station La Almunia Radio -> https://stream.zeno.fm/dahlxvtaz1guv
This url can play all day long in my PC's webbrowser.
When I play it on my own ESP32, it tends to stop with -> ESP32_VS1053_Stream::_eofStream()
Sometimes that happens after 3 minutes, but also 10-20 minutes. It stops randomly, in the middle of a song playing.
Digging a bit further, that is called from the very end of ESP32_VS1053_Stream::_feedDecoder(WiFiClient *stream) and this is an ADTS chunked stream. And caused by ESP32_VS1053_Stream::_handleChunkedStream(WiFiClient *stream) that sets _remainingBytes to zero.
Which happens because size_t ESP32_VS1053_Stream::_nextChunkSize(WiFiClient *stream) returns 0 at the end with return strtol(buffer, nullptr, 16);
If you look at it, it is really as if it meets all the conditions you expect with a planned end-of-stream (if such thing exists) by the broadcaster. The last chunk is a \r\n with nothing else.
The question is, why does my PC seem to have no problem and plays all day.
Is it a stupid idea - if this exit occurs as described, to just restart the stream?
Or could it be something else I should dig into?
Sometimes I see some behaviour I can't really explain, and triggers me to investigate.
For instance, I have a spanish radio station La Almunia Radio -> https://stream.zeno.fm/dahlxvtaz1guv
This url can play all day long in my PC's webbrowser.
When I play it on my own ESP32, it tends to stop with -> ESP32_VS1053_Stream::_eofStream()
Sometimes that happens after 3 minutes, but also 10-20 minutes. It stops randomly, in the middle of a song playing.
Digging a bit further, that is called from the very end of ESP32_VS1053_Stream::_feedDecoder(WiFiClient *stream) and this is an ADTS chunked stream. And caused by ESP32_VS1053_Stream::_handleChunkedStream(WiFiClient *stream) that sets _remainingBytes to zero.
Which happens because size_t ESP32_VS1053_Stream::_nextChunkSize(WiFiClient *stream) returns 0 at the end with return strtol(buffer, nullptr, 16);
If you look at it, it is really as if it meets all the conditions you expect with a planned end-of-stream (if such thing exists) by the broadcaster. The last chunk is a \r\n with nothing else.
The question is, why does my PC seem to have no problem and plays all day.
Is it a stupid idea - if this exit occurs as described, to just restart the stream?
Or could it be something else I should dig into?