lavu/parseutils: fix av_small_strptime() whitespace directive parsing
According to POSIX, strptime() should consume whitespaces in the date string everytime a whitespace conversion specification is found in the date format specification. Make av_small_strptime() conform with this behavior. In particular, should fix trac ticket #1739.
This commit is contained in:
parent
83438a0db3
commit
85c93d90df
@ -443,6 +443,12 @@ char *av_small_strptime(const char *p, const char *fmt, struct tm *dt)
|
|||||||
int c, val;
|
int c, val;
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
|
/* consume time string until a non whitespace char is found */
|
||||||
|
while (isspace(*fmt)) {
|
||||||
|
while (isspace(*p))
|
||||||
|
p++;
|
||||||
|
fmt++;
|
||||||
|
}
|
||||||
c = *fmt++;
|
c = *fmt++;
|
||||||
if (c == '\0') {
|
if (c == '\0') {
|
||||||
return (char *)p;
|
return (char *)p;
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#define LIBAVUTIL_VERSION_MAJOR 51
|
#define LIBAVUTIL_VERSION_MAJOR 51
|
||||||
#define LIBAVUTIL_VERSION_MINOR 73
|
#define LIBAVUTIL_VERSION_MINOR 73
|
||||||
#define LIBAVUTIL_VERSION_MICRO 100
|
#define LIBAVUTIL_VERSION_MICRO 101
|
||||||
|
|
||||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||||
LIBAVUTIL_VERSION_MINOR, \
|
LIBAVUTIL_VERSION_MINOR, \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user