Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
dace6b3f
Commit
dace6b3f
authored
Nov 23, 2010
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter/httplive.c: cleanup
Cleanup NextSegment().
parent
edf94bcb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
modules/stream_filter/httplive.c
modules/stream_filter/httplive.c
+12
-14
No files found.
modules/stream_filter/httplive.c
View file @
dace6b3f
...
...
@@ -853,7 +853,7 @@ static int Download(stream_t *s, hls_stream_t *hls, segment_t *segment, int *cur
if
(
hls
->
segment
-
s
->
p_sys
->
segment
<
3
)
return
VLC_SUCCESS
;
/* check for d
e
vision by zero */
/* check for d
i
vision by zero */
double
ms
=
(
double
)
duration
/
1000
.
0
;
/* ms */
if
(
ms
<=
0
.
0
)
return
VLC_SUCCESS
;
...
...
@@ -1217,9 +1217,9 @@ static void Close(vlc_object_t *p_this)
static
segment_t
*
NextSegment
(
stream_t
*
s
)
{
stream_sys_t
*
p_sys
=
s
->
p_sys
;
segment_t
*
segment
;
segment_t
*
segment
=
NULL
;
do
while
(
vlc_object_alive
(
s
))
{
/* Is the next segment ready */
hls_stream_t
*
hls
=
hls_Get
(
p_sys
->
hls_stream
,
p_sys
->
current
);
...
...
@@ -1232,18 +1232,18 @@ static segment_t *NextSegment(stream_t *s)
if
(
segment
->
data
!=
NULL
)
return
segment
;
/* Was the stream changed to another bitrate? */
if
(
!
p_sys
->
b_meta
)
return
NULL
;
/* Was the stream changed to another bitrate? */
if
(
p_sys
->
current
!=
p_sys
->
thread
->
current
)
{
/* YES it was */
msg_Info
(
s
,
"playback is switching from stream %d to %d"
,
p_sys
->
current
,
p_sys
->
thread
->
current
);
p_sys
->
current
=
p_sys
->
thread
->
current
;
continue
;
}
else
{
#if 0
/* Not downloaded yet, do it here */
if (Download(s, hls, segment, &p_sys->current) != VLC_SUCCESS)
...
...
@@ -1252,8 +1252,6 @@ static segment_t *NextSegment(stream_t *s)
#endif
return
NULL
;
}
}
while
(
vlc_object_alive
(
s
));
return
segment
;
}
...
...
@@ -1341,7 +1339,7 @@ again:
segment
=
NextSegment
(
s
);
if
(
segment
==
NULL
)
{
msg_Err
(
s
,
"segment should have been availabe"
);
msg_Err
(
s
,
"segment should have been availab
l
e"
);
return
0
;
/* eof? */
}
...
...
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