Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
0d666200
Commit
0d666200
authored
Apr 10, 2022
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/timecode: use timecode fps for number of frame digits
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
8dd5bb72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
timecode.c
libavutil/timecode.c
+4
-3
No files found.
libavutil/timecode.c
View file @
0d666200
...
...
@@ -104,7 +104,7 @@ char *av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum)
{
int
fps
=
tc
->
fps
;
int
drop
=
tc
->
flags
&
AV_TIMECODE_FLAG_DROPFRAME
;
int
hh
,
mm
,
ss
,
ff
,
neg
=
0
;
int
hh
,
mm
,
ss
,
ff
,
ff_len
,
neg
=
0
;
framenum
+=
tc
->
start
;
if
(
drop
)
...
...
@@ -119,9 +119,10 @@ char *av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum)
hh
=
framenum
/
(
fps
*
3600LL
);
if
(
tc
->
flags
&
AV_TIMECODE_FLAG_24HOURSMAX
)
hh
=
hh
%
24
;
snprintf
(
buf
,
AV_TIMECODE_STR_SIZE
,
"%s%02d:%02d:%02d%c%02d"
,
ff_len
=
fps
>
10000
?
5
:
fps
>
1000
?
4
:
fps
>
100
?
3
:
fps
>
10
?
2
:
1
;
snprintf
(
buf
,
AV_TIMECODE_STR_SIZE
,
"%s%02d:%02d:%02d%c%0*d"
,
neg
?
"-"
:
""
,
hh
,
mm
,
ss
,
drop
?
';'
:
':'
,
ff
);
hh
,
mm
,
ss
,
drop
?
';'
:
':'
,
ff
_len
,
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