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