Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
169604c5
Commit
169604c5
authored
Apr 23, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter: httplive: fix delay on eof
parent
e865aed6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
modules/stream_filter/httplive.c
modules/stream_filter/httplive.c
+16
-0
No files found.
modules/stream_filter/httplive.c
View file @
169604c5
...
...
@@ -157,6 +157,7 @@ struct stream_sys_t
vlc_mutex_t
lock
;
bool
paused
;
atomic_bool
closing
;
atomic_bool
eof
;
};
/****************************************************************************
...
...
@@ -1667,6 +1668,13 @@ static void* hls_Thread(void *p_this)
(
p_sys
->
download
.
segment
>=
count
))
&&
(
p_sys
->
download
.
seek
==
-
1
))
{
if
(
!
p_sys
->
b_live
&&
p_sys
->
download
.
segment
>=
count
)
{
/* this was last segment to read */
atomic_store
(
&
p_sys
->
eof
,
true
);
}
vlc_cond_wait
(
&
p_sys
->
download
.
wait
,
&
p_sys
->
download
.
lock_wait
);
if
(
p_sys
->
b_live
/*&& (mdate() >= p_sys->playlist.wakeup)*/
)
break
;
...
...
@@ -1678,6 +1686,7 @@ static void* hls_Thread(void *p_this)
{
p_sys
->
download
.
segment
=
p_sys
->
download
.
seek
;
p_sys
->
download
.
seek
=
-
1
;
atomic_store
(
&
p_sys
->
eof
,
false
);
}
vlc_mutex_unlock
(
&
p_sys
->
download
.
lock_wait
);
...
...
@@ -2071,6 +2080,7 @@ static int Open(vlc_object_t *p_this)
p_sys
->
paused
=
false
;
atomic_init
(
&
p_sys
->
closing
,
false
);
atomic_init
(
&
p_sys
->
eof
,
false
);
vlc_cond_init
(
&
p_sys
->
wait
);
vlc_mutex_init
(
&
p_sys
->
lock
);
...
...
@@ -2426,6 +2436,12 @@ static int Read(stream_t *s, void *buffer, unsigned int i_read)
// running this read operation is also responsible for closing the stream
if
(
length
==
0
)
{
if
(
atomic_load
(
&
p_sys
->
eof
))
/* finished reading last segment */
{
vlc_mutex_unlock
(
&
p_sys
->
read
.
lock_wait
);
return
0
;
}
mtime_t
start
=
mdate
();
// Wait for 10 seconds
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment