hlsdemux: Fix how the playlists are refreshed
We should only refresh the currently selected variant playlist (if any, otherwise the main playlist), not the main playlist. And only try to refresh the main playlist if updating the variant playlist fails. Some servers (Wowza) use the request of the main playlist to create a "session", which is then part of the URI of the variant playlist and also the fragments. Refreshing the main playlist would generate a new session, and the server rate limits that usually. And after a few retries the server just kicks us out. Also as a side effect we now use the same downloader for all playlists, so that we only have 2 instead of 3 connections to the server. And also previously we just ignored the downloaded data from the main playlist that the base class gave to us.
Showing with 3 additions and 5 deletions