Commit 16591673 authored by Jean-Paul Saman's avatar Jean-Paul Saman

stream_filter/httplive.c: Rename NextSegment() to GetSegment()

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.
parent 68f1ff3b
...@@ -1313,12 +1313,12 @@ static void Close(vlc_object_t *p_this) ...@@ -1313,12 +1313,12 @@ static void Close(vlc_object_t *p_this)
/**************************************************************************** /****************************************************************************
* Stream filters functions * 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; stream_sys_t *p_sys = s->p_sys;
segment_t *segment = NULL; 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); hls_stream_t *hls = hls_Get(p_sys->hls_stream, p_sys->current);
if (hls != NULL) if (hls != NULL)
{ {
...@@ -1390,7 +1390,7 @@ static ssize_t hls_Read(stream_t *s, uint8_t *p_read, unsigned int i_read) ...@@ -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 /* Determine next segment to read. If this is a meta playlist and
* bandwidth conditions changed, then the stream might have switched * bandwidth conditions changed, then the stream might have switched
* to another bandwidth. */ * to another bandwidth. */
segment_t *segment = NextSegment(s); segment_t *segment = GetSegment(s);
if (segment == NULL) if (segment == NULL)
break; break;
...@@ -1472,7 +1472,7 @@ static int Peek(stream_t *s, const uint8_t **pp_peek, unsigned int i_peek) ...@@ -1472,7 +1472,7 @@ static int Peek(stream_t *s, const uint8_t **pp_peek, unsigned int i_peek)
segment_t *segment; segment_t *segment;
again: again:
segment = NextSegment(s); segment = GetSegment(s);
if (segment == NULL) if (segment == NULL)
{ {
msg_Err(s, "segment should have been available"); msg_Err(s, "segment should have been available");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment