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
14eb3345
Commit
14eb3345
authored
Mar 17, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify
Originally committed as revision 8427 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
41c8a56a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
utils.c
libavformat/utils.c
+7
-12
No files found.
libavformat/utils.c
View file @
14eb3345
...
...
@@ -618,21 +618,16 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
if
(
presentation_delayed
)
{
/* DTS = decompression time stamp */
/* PTS = presentation time stamp */
if
(
pkt
->
dts
==
AV_NOPTS_VALUE
)
{
/* if we know the last pts, use it */
if
(
st
->
last_IP_pts
!=
AV_NOPTS_VALUE
)
st
->
cur_dts
=
pkt
->
dts
=
st
->
last_IP_pts
;
else
pkt
->
dts
=
st
->
cur_dts
;
}
else
{
st
->
cur_dts
=
pkt
->
dts
;
}
if
(
pkt
->
dts
==
AV_NOPTS_VALUE
)
pkt
->
dts
=
st
->
last_IP_pts
;
if
(
pkt
->
dts
==
AV_NOPTS_VALUE
)
pkt
->
dts
=
st
->
cur_dts
;
/* this is tricky: the dts must be incremented by the duration
of the frame we are displaying, i.e. the last I or P frame */
if
(
st
->
last_IP_duration
==
0
)
st
->
cur_dts
+=
pkt
->
duration
;
else
st
->
cur_dts
+=
st
->
last_IP_duration
;
st
->
last_IP_duration
=
pkt
->
duration
;
st
->
cur_dts
=
pkt
->
dts
+
st
->
last_IP_duration
;
st
->
last_IP_duration
=
pkt
->
duration
;
st
->
last_IP_pts
=
pkt
->
pts
;
/* cannot compute PTS if not present (we can compute it only
...
...
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