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
86a24868
Commit
86a24868
authored
Dec 01, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu/parseutils: accept %J for hours >= 24.
Allow to parse durations >= 24:00:00.
parent
b61ba262
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
parseutils.c
libavutil/parseutils.c
+3
-2
parseutils.h
libavutil/parseutils.h
+1
-0
version.h
libavutil/version.h
+1
-1
No files found.
libavutil/parseutils.c
View file @
86a24868
...
...
@@ -454,7 +454,8 @@ char *av_small_strptime(const char *p, const char *fmt, struct tm *dt)
c
=
*
fmt
++
;
switch
(
c
)
{
case
'H'
:
val
=
date_get_num
(
&
p
,
0
,
23
,
2
);
case
'J'
:
val
=
date_get_num
(
&
p
,
0
,
c
==
'H'
?
23
:
INT_MAX
,
2
);
if
(
val
==
-
1
)
return
NULL
;
dt
->
tm_hour
=
val
;
...
...
@@ -581,7 +582,7 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration)
++
p
;
}
/* parse timestr as HH:MM:SS */
q
=
av_small_strptime
(
p
,
time_fmt
[
0
]
,
&
dt
);
q
=
av_small_strptime
(
p
,
"%J:%M:%S"
,
&
dt
);
if
(
!
q
)
{
/* parse timestr as S+ */
dt
.
tm_sec
=
strtol
(
p
,
(
void
*
)
&
q
,
10
);
...
...
libavutil/parseutils.h
View file @
86a24868
...
...
@@ -141,6 +141,7 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration);
* In particular it actually supports the parameters:
* - %H: the hour as a decimal number, using a 24-hour clock, in the
* range '00' through '23'
* - %J: hours as a decimal number, in the range '0' through INT_MAX
* - %M: the minute as a decimal number, using a 24-hour clock, in the
* range '00' through '59'
* - %S: the second as a decimal number, using a 24-hour clock, in the
...
...
libavutil/version.h
View file @
86a24868
...
...
@@ -76,7 +76,7 @@
#define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR 11
#define LIBAVUTIL_VERSION_MICRO 10
0
#define LIBAVUTIL_VERSION_MICRO 10
1
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
...
...
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