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
831f6cd6
Commit
831f6cd6
authored
Dec 26, 2011
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timecode: fix drop frame in avpriv_timecode_to_string().
parent
357cb533
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
timecode.c
libavcodec/timecode.c
+5
-4
No files found.
libavcodec/timecode.c
View file @
831f6cd6
...
...
@@ -83,13 +83,14 @@ char *avpriv_timecode_to_string(char *buf, const struct ff_timecode *tc, unsigne
{
int
frame_num
=
tc
->
start
+
frame
;
int
fps
=
(
tc
->
rate
.
num
+
tc
->
rate
.
den
/
2
)
/
tc
->
rate
.
den
;
int
ff
=
frame_num
%
fps
;
int
ss
=
frame_num
/
fps
%
60
;
int
mm
=
frame_num
/
(
fps
*
60
)
%
60
;
int
hh
=
frame_num
/
(
fps
*
3600
)
%
24
;
int
hh
,
mm
,
ss
,
ff
;
if
(
tc
->
drop
)
frame_num
=
avpriv_framenum_to_drop_timecode
(
frame_num
);
ff
=
frame_num
%
fps
;
ss
=
frame_num
/
fps
%
60
;
mm
=
frame_num
/
(
fps
*
60
)
%
60
;
hh
=
frame_num
/
(
fps
*
3600
)
%
24
;
snprintf
(
buf
,
sizeof
(
"hh:mm:ss.ff"
),
"%02d:%02d:%02d%c%02d"
,
hh
,
mm
,
ss
,
tc
->
drop
?
';'
:
':'
,
ff
);
return
buf
;
...
...
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