karlheyes / icecast-kh

KH branch of icecast
GNU General Public License v2.0
300 stars 107 forks source link

Relay from source with changing formats #331

Open lalinsky opened 4 years ago

lalinsky commented 4 years ago

If you have a relay that is configured to read from a certain stream and then at some point the stream changes its format, the relay will still remember the old format and it causes all kinds of issues. For example, if you pushed AAC to the stream once and then switched to MP3, they relay would still think the stream is AAC. I'd expect that when the relay loses connection, it should forget everything about the stream it was relaying from.

karlheyes commented 4 years ago

Changing format midflow is always going to cause problems and with relays there is an added problem of persistence to make sure things maintain certain info because even an inactive stream may need certain info like for directory listing for an on-demand relay, or if there is a fallback to handle a failed connection. It really depends on what exactly happens on the format change, what the relay was doing at the time and how it is configured.

karl.

lalinsky commented 4 years ago

It's not really changing the format midflow (there is a time when the stream is inactive between the format changes), but it's the persistence that's causing problems. Is there a way around that? The only option I can think of is watching for the relay disconnects and then remove/reload/add the mount in the config.