httplive: download segment without content-length
This patch is not good enough, but better than assert. I think we need some byte stream implement like block_bytestream_t (include/vlc_block_helper.h). However, that would be a bigger patch, which may broke the decryption implement.
To play the problem URL: http://gslb.tv.sohu.com/live?cid=8&type=hls . VLC also need other patches attached in #6871 (closed) #6872 (closed), each can be applied individually.
The whole problem is explained below:
- http://gslb.tv.sohu.com/live?cid=8&type=hls gives a 302 redirection to another URL. After that, httplive module tries to access URL like "http://http://host/path".
- Fixed in #6872 (closed)
- http://113.105.155.17:8080/playlist/8.m3u8 is the redirected URL, it gives the content below:
#EXTM3U
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:24715
#EXTINF:5,
/hls/8?start=164121475&end=164128435
#EXT-X-MEDIA-SEQUENCE:24716
#EXTINF:5,
/hls/8?start=164128435&end=164135995
#EXT-X-MEDIA-SEQUENCE:24717
#EXTINF:5,
/hls/8?start=164135995&end=164141195
According to http://tools.ietf.org/html/draft-pantos-http-live-streaming-08 , "A Playlist file MUST NOT contain more than one EXT-X-MEDIA-SEQUENCE tag". The server's BUG cause VLC append segment sequence id as "24715, 24717, 24719".
- Fixed in the second patch. Not quite necessary, if VLC has no need to work with this BUGed m3u8.
- The absolute path relative to the URL can not be resolved correctly.
- Fixed in #6871 (closed)
- The segment URL does not give "content-length" header, that causes assert in VLC.
- Fixed in the first patch