Commit 5e1ede6f authored by Jean-Paul Saman's avatar Jean-Paul Saman

Revert "stream_filter/httplive.c: seeking in segments not downloaded yet. (WIP)"

This reverts commit ca6d12b6.

Conflicts:

	modules/stream_filter/httplive.c
parent 50b0a07a
......@@ -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;
......@@ -1441,28 +1441,19 @@ static int segment_Seek(stream_t *s, uint64_t pos)
uint64_t length = 0;
bool b_found = false;
vlc_mutex_lock(&hls->lock);
int count = vlc_array_count(hls->segments);
vlc_mutex_unlock(&hls->lock);
for (int n = 0; n < count && !b_found; n++)
for (int n = 0; n < count; n++)
{
/* FIXME: Seeking in segments not dowloaded is not supported. */
vlc_mutex_lock(&hls->lock);
if (n >= p_sys->thread->segment)
{
msg_Err(s, "seeking in segment not downloaded yet.");
vlc_mutex_unlock(&hls->lock);
return VLC_EGENERIC;
}
segment_t *segment = vlc_array_item_at_index(hls->segments, n);
if (segment == NULL)
{
vlc_mutex_unlock(&hls->lock);
return VLC_EGENERIC;
}
vlc_mutex_unlock(&hls->lock);
vlc_mutex_lock(&segment->lock);
length += segment->size;
......
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