hlsdemux: Fix how the playlists are refreshed
authorSebastian Dröge <sebastian@centricular.com>
Thu, 23 Apr 2015 15:33:04 +0000 (17:33 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 23 Apr 2015 15:47:18 +0000 (17:47 +0200)
commitbb36ffb6336e9232c49513965679f6ee17cadbef
treedd204058647277a1f3983ccbde5a2e2cb28965b4
parent0cd3938345d245954c37d58904364444fab8cef7
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.
ext/hls/gsthlsdemux.c