Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
3ac754b9
Commit
3ac754b9
authored
Aug 20, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hls: fix min DTS code, try #2
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
bf606334
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
hls.c
libavformat/hls.c
+14
-4
No files found.
libavformat/hls.c
View file @
3ac754b9
...
@@ -646,13 +646,23 @@ start:
...
@@ -646,13 +646,23 @@ start:
}
}
/* Check if this stream has the packet with the lowest dts */
/* Check if this stream has the packet with the lowest dts */
if
(
var
->
pkt
.
data
)
{
if
(
var
->
pkt
.
data
)
{
if
(
minvariant
<
0
)
{
minvariant
=
i
;
}
else
{
struct
variant
*
minvar
=
c
->
variants
[
minvariant
];
struct
variant
*
minvar
=
c
->
variants
[
minvariant
];
if
(
minvariant
<
0
||
int64_t
dts
=
var
->
pkt
.
dts
;
av_compare_ts
(
var
->
pkt
.
dts
,
var
->
ctx
->
streams
[
var
->
pkt
.
stream_index
]
->
time_base
,
int64_t
mindts
=
minvar
->
pkt
.
dts
;
minvar
->
pkt
.
dts
,
minvar
->
ctx
->
streams
[
minvar
->
pkt
.
stream_index
]
->
time_base
)
>
0
)
AVStream
*
st
=
var
->
ctx
->
streams
[
var
->
pkt
.
stream_index
];
AVStream
*
minst
=
minvar
->
ctx
->
streams
[
minvar
->
pkt
.
stream_index
];
if
(
st
->
start_time
!=
AV_NOPTS_VALUE
)
dts
-=
st
->
start_time
;
if
(
minst
->
start_time
!=
AV_NOPTS_VALUE
)
mindts
-=
minst
->
start_time
;
if
(
av_compare_ts
(
dts
,
st
->
time_base
,
mindts
,
minst
->
time_base
)
<
0
)
minvariant
=
i
;
minvariant
=
i
;
}
}
}
}
}
if
(
c
->
end_of_segment
)
{
if
(
c
->
end_of_segment
)
{
if
(
recheck_discard_flags
(
s
,
0
))
if
(
recheck_discard_flags
(
s
,
0
))
goto
start
;
goto
start
;
...
...
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