[vlc-commits] Fix http live streaming without bandwith set (optional according to spec)

Jeroen Ost git at videolan.org
Thu Feb 23 15:26:24 CET 2012


vlc/vlc-2.0 | branch: master | Jeroen Ost <jeroen.ost at gmail.com> | Wed Feb 22 21:32:08 2012 +0100| [d96e19a290006fa1c2b9f91c91cad8bae20c3589] | committer: Jean-Baptiste Kempf

Fix http live streaming without bandwith set (optional according to spec)

This patch fixes Apple Http Live Streaming of a single stream without bandwith set.
According to the draft RFC, the bandwith parameter is optional. VLC treats this as bandwith zero but
estimates the bandwith based on time it takes to download segments to be able to seek accurately. When
the playlist is updated for a live m3u8, the bandwith value of 0 will cause a new version of the playlist
to be created - effectively stalling the playing stream. This patch makes sure that playlists that do not
specify bandwith reference the same instance.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 0b54d2cb5ead026c158556fafc9fea75e8b640f5)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=d96e19a290006fa1c2b9f91c91cad8bae20c3589
---

 modules/stream_filter/httplive.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 23d5b6b..578cf80 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -314,7 +314,7 @@ static hls_stream_t *hls_Find(vlc_array_t *hls_stream, hls_stream_t *hls_new)
         {
             /* compare */
             if ((hls->id == hls_new->id) &&
-                (hls->bandwidth == hls_new->bandwidth))
+                ((hls->bandwidth == hls_new->bandwidth)||(hls_new->bandwidth==0)))
                 return hls;
         }
     }



More information about the vlc-commits mailing list