]> git.sesse.net Git - vlc/commitdiff
stream_filter/httplive.c: Rename NextSegment() to GetSegment()
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Fri, 17 Dec 2010 14:35:28 +0000 (15:35 +0100)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Wed, 22 Dec 2010 08:38:27 +0000 (09:38 +0100)
The function NextSegment() no longer resembles its name. It does not
get the next segment. It just gets the segment p_sys->segment from a
HLS stream (default p_sys->current).

Renamed the function GetSegment() to more resemble its usage.

modules/stream_filter/httplive.c

index c0ca84aeb7d8526ed3ffd341231535eb21f8f067..1815d9efa3a302b114c359380c2185ec6c621ba4 100644 (file)
@@ -1313,12 +1313,12 @@ static void Close(vlc_object_t *p_this)
 /****************************************************************************
  * Stream filters functions
  ****************************************************************************/
-static segment_t *NextSegment(stream_t *s)
+static segment_t *GetSegment(stream_t *s)
 {
     stream_sys_t *p_sys = s->p_sys;
     segment_t *segment = NULL;
 
-    /* Is the next segment of the current HLS stream ready? */
+    /* Is this segment of the current HLS stream ready? */
     hls_stream_t *hls = hls_Get(p_sys->hls_stream, p_sys->current);
     if (hls != NULL)
     {
@@ -1390,7 +1390,7 @@ static ssize_t hls_Read(stream_t *s, uint8_t *p_read, unsigned int i_read)
         /* Determine next segment to read. If this is a meta playlist and
          * bandwidth conditions changed, then the stream might have switched
          * to another bandwidth. */
-        segment_t *segment = NextSegment(s);
+        segment_t *segment = GetSegment(s);
         if (segment == NULL)
             break;
 
@@ -1472,7 +1472,7 @@ static int Peek(stream_t *s, const uint8_t **pp_peek, unsigned int i_peek)
     segment_t *segment;
 
 again:
-    segment = NextSegment(s);
+    segment = GetSegment(s);
     if (segment == NULL)
     {
         msg_Err(s, "segment should have been available");