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
b2a8ce4e
Commit
b2a8ce4e
authored
Aug 19, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nutenc: keep track of max_pts
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c2a134c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
nut.h
libavformat/nut.h
+2
-0
nutenc.c
libavformat/nutenc.c
+5
-0
No files found.
libavformat/nut.h
View file @
b2a8ce4e
...
...
@@ -103,6 +103,8 @@ typedef struct {
AVRational
*
time_base
;
struct
AVTreeNode
*
syncpoints
;
int
sp_count
;
int64_t
max_pts
;
AVRational
*
max_pts_tb
;
}
NUTContext
;
extern
const
AVCodecTag
ff_nut_subtitle_tags
[];
...
...
libavformat/nutenc.c
View file @
b2a8ce4e
...
...
@@ -863,6 +863,11 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt){
nus
->
keyframe_pts
[
nut
->
sp_count
]
=
pkt
->
pts
;
}
if
(
!
nut
->
max_pts_tb
||
av_compare_ts
(
nut
->
max_pts
,
*
nut
->
max_pts_tb
,
pkt
->
pts
,
*
nus
->
time_base
)
<
0
)
{
nut
->
max_pts
=
pkt
->
pts
;
nut
->
max_pts_tb
=
nus
->
time_base
;
}
return
0
;
}
...
...
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