[vlc-commits] commit: stream_filter/httplive.c: Allow bandwidth adaptation while prefetching. (Jean-Paul Saman )
git at videolan.org
git at videolan.org
Wed Dec 22 09:59:13 CET 2010
vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Mon Dec 20 19:48:37 2010 +0100| [4c4ac43110ad6afbd36c7b7bbdb9b92014f5a906] | committer: Jean-Paul Saman
stream_filter/httplive.c: Allow bandwidth adaptation while prefetching.
Allow bandwidth adaptation while prefetching.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4c4ac43110ad6afbd36c7b7bbdb9b92014f5a906
---
modules/stream_filter/httplive.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index bb62be4..b048a23 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1012,9 +1012,10 @@ again:
goto again;
/* Download first 2 segments of this HLS stream */
+ stream = *current;
for (int i = 0; i < 2; i++)
{
- segment_t *segment = segment_GetSegment(hls, p_sys->segment);
+ segment_t *segment = segment_GetSegment(hls, i);
if (segment == NULL )
return VLC_EGENERIC;
@@ -1028,6 +1029,16 @@ again:
return VLC_EGENERIC;
p_sys->segment++;
+
+ /* adapt bandwidth? */
+ if (*current != stream)
+ {
+ hls_stream_t *hls = hls_Get(p_sys->hls_stream, *current);
+ if (hls == NULL)
+ return VLC_EGENERIC;
+
+ stream = *current;
+ }
}
return VLC_SUCCESS;
More information about the vlc-commits
mailing list