Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
831f6cd6
Commit
831f6cd6
authored
13 years ago
by
Clément Bœsch
Browse files
Options
Downloads
Patches
Plain Diff
timecode: fix drop frame in avpriv_timecode_to_string().
parent
357cb533
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/timecode.c
+5
-4
5 additions, 4 deletions
libavcodec/timecode.c
with
5 additions
and
4 deletions
libavcodec/timecode.c
+
5
−
4
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment