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
a5c4d7af
Commit
a5c4d7af
authored
Aug 26, 2013
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
httplive: small simplification
parent
623a50eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
modules/stream_filter/httplive.c
modules/stream_filter/httplive.c
+5
-7
No files found.
modules/stream_filter/httplive.c
View file @
a5c4d7af
...
@@ -449,8 +449,9 @@ static int ChooseSegment(stream_t *s, const int current)
...
@@ -449,8 +449,9 @@ static int ChooseSegment(stream_t *s, const int current)
int
duration
=
0
;
int
duration
=
0
;
int
sequence
=
0
;
int
sequence
=
0
;
int
count
=
vlc_array_count
(
hls
->
segments
);
int
count
=
vlc_array_count
(
hls
->
segments
);
int
i
=
p_sys
->
b_live
?
count
-
1
:
0
;
int
i
=
p_sys
->
b_live
?
count
-
1
:
-
1
;
/* We do while loop only with live case, otherwise return 0*/
while
((
i
>=
0
)
&&
(
i
<
count
))
while
((
i
>=
0
)
&&
(
i
<
count
))
{
{
segment_t
*
segment
=
segment_GetSegment
(
hls
,
i
);
segment_t
*
segment
=
segment_GetSegment
(
hls
,
i
);
...
@@ -466,15 +467,12 @@ static int ChooseSegment(stream_t *s, const int current)
...
@@ -466,15 +467,12 @@ static int ChooseSegment(stream_t *s, const int current)
if
(
duration
>=
3
*
hls
->
duration
)
if
(
duration
>=
3
*
hls
->
duration
)
{
{
/* Start point found */
/* Start point found */
wanted
=
p_sys
->
b_live
?
i
:
0
;
wanted
=
i
;
sequence
=
segment
->
sequence
;
sequence
=
segment
->
sequence
;
break
;
break
;
}
}
if
(
p_sys
->
b_live
)
i
--
;
i
--
;
else
i
++
;
}
}
msg_Dbg
(
s
,
"Choose segment %d/%d (sequence=%d)"
,
wanted
,
count
,
sequence
);
msg_Dbg
(
s
,
"Choose segment %d/%d (sequence=%d)"
,
wanted
,
count
,
sequence
);
...
@@ -748,7 +746,7 @@ static int parse_MediaSequence(stream_t *s, hls_stream_t *hls, char *p_read)
...
@@ -748,7 +746,7 @@ static int parse_MediaSequence(stream_t *s, hls_stream_t *hls, char *p_read)
if
(
(
last_segment
->
sequence
<
sequence
)
&&
if
(
(
last_segment
->
sequence
<
sequence
)
&&
(
sequence
-
last_segment
->
sequence
>=
1
))
(
sequence
-
last_segment
->
sequence
>=
1
))
msg_Err
(
s
,
"EXT-X-MEDIA-SEQUENCE gap in playlist (new=%d, old=%d)"
,
msg_Err
(
s
,
"EXT-X-MEDIA-SEQUENCE gap in playlist (new=%d, old=%d)"
,
sequence
,
last
->
sequence
);
sequence
,
last
_segment
->
sequence
);
}
}
else
else
msg_Err
(
s
,
"EXT-X-MEDIA-SEQUENCE already present in playlist (new=%d, old=%d)"
,
msg_Err
(
s
,
"EXT-X-MEDIA-SEQUENCE already present in playlist (new=%d, old=%d)"
,
...
...
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