mirror of https://git.ffmpeg.org/ffmpeg.git
avutil/parseutils: only accept full us duration, do not accept mss duration
Accepting 'u' suffix for a time specification is neither intuitive nor consistent (now that we don't accept m). Also there was a bug in the code accepting an extra 's' even after 'ms'. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
cf5ffe0183
commit
8d37dd6ed3
|
@ -693,12 +693,11 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration)
|
||||||
suffix = 1000;
|
suffix = 1000;
|
||||||
microseconds /= 1000;
|
microseconds /= 1000;
|
||||||
q += 2;
|
q += 2;
|
||||||
} else if (*q == 'u') {
|
} else if (q[0] == 'u' && q[1] == 's') {
|
||||||
suffix = 1;
|
suffix = 1;
|
||||||
microseconds = 0;
|
microseconds = 0;
|
||||||
q++;
|
q += 2;
|
||||||
}
|
} else if (*q == 's')
|
||||||
if (*q == 's')
|
|
||||||
q++;
|
q++;
|
||||||
} else {
|
} else {
|
||||||
int is_utc = *q == 'Z' || *q == 'z';
|
int is_utc = *q == 'Z' || *q == 'z';
|
||||||
|
|
Loading…
Reference in New Issue