Commit 50b0a07a authored by Jean-Paul Saman's avatar Jean-Paul Saman

Revert "stream_filter/httplive.c: Better length calculation (WIP)"

This reverts commit da2b1252.
parent 80fbf19e
......@@ -61,7 +61,7 @@ vlc_module_end()
typedef struct segment_s
{
int sequence; /* unique sequence number */
mtime_t length; /* segment duration (ms) */
int length; /* segment duration (ms) */
uint64_t size; /* segment size in bytes */
vlc_url_t url;
......@@ -239,7 +239,7 @@ static segment_t *segment_New(hls_stream_t* hls, int duration, char *uri)
if (segment == NULL)
return NULL;
segment->length = duration * INT64_C(1000000);
segment->length = duration; /* seconds */
segment->size = 0; /* bytes */
segment->sequence = 0;
vlc_UrlParse(&segment->url, uri, 0);
......@@ -774,7 +774,7 @@ static int parse_HTTPLiveStreaming(stream_t *s)
for (int i = 0; i < num; i++)
{
segment_t *segment = segment_GetSegment(hls, i);
if (segment && segment->length >= (hls->duration * INT64_C(1000000)))
if (segment && segment->length >= hls->duration)
ok++;
}
if (ok < 3)
......@@ -947,7 +947,7 @@ static int Prefetch(stream_t *s, int *current)
{
stream_sys_t *p_sys = s->p_sys;
hls_stream_t *hls = hls_Get(p_sys->hls_stream, *current);
hls_stream_t *hls = hls_Get(p_sys->hls_stream, current);
if (hls == NULL)
return VLC_EGENERIC;
......
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