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
ddfefc92
Commit
ddfefc92
authored
Dec 17, 2010
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter/httplive.c: Terminate NextSegment() properly
fixup:
9b3bed2c
parent
eaa82d6a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
modules/stream_filter/httplive.c
modules/stream_filter/httplive.c
+13
-10
No files found.
modules/stream_filter/httplive.c
View file @
ddfefc92
...
...
@@ -1316,36 +1316,39 @@ static segment_t *NextSegment(stream_t *s)
{
/* Is the next segment ready */
hls_stream_t
*
hls
=
hls_Get
(
p_sys
->
hls_stream
,
i_stream
);
if
(
hls
==
NULL
)
return
NULL
;
if
(
hls
==
NULL
)
return
NULL
;
vlc_mutex_lock
(
&
hls
->
lock
);
segment
=
segment_GetSegment
(
hls
,
p_sys
->
segment
);
if
(
segment
==
NULL
)
goto
fail
;
{
vlc_mutex_unlock
(
&
hls
->
lock
);
break
;
}
/* This segment is ready? */
if
((
segment
->
data
!=
NULL
)
&&
(
p_sys
->
segment
<
p_sys
->
thread
->
segment
))
goto
segment_ok
;
if
(
!
p_sys
->
b_meta
)
goto
fail
;
vlc_mutex_unlock
(
&
hls
->
lock
);
if
(
!
p_sys
->
b_meta
)
break
;
/* Was the stream changed to another bitrate? */
i_stream
++
;
if
(
i_stream
>=
vlc_array_count
(
p_sys
->
hls_stream
))
goto
fail
;
vlc_mutex_unlock
(
&
hls
->
lock
);
break
;
}
/* */
return
NULL
;
segment_ok:
p_sys
->
current
=
i_stream
;
vlc_mutex_unlock
(
&
hls
->
lock
);
return
segment
;
fail:
vlc_mutex_unlock
(
&
hls
->
lock
);
return
NULL
;
}
static
ssize_t
hls_Read
(
stream_t
*
s
,
uint8_t
*
p_read
,
unsigned
int
i_read
)
...
...
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