Commit 8d37dd6e authored by Marton Balint's avatar Marton Balint

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: 's avatarMarton Balint <cus@passwd.hu>
parent cf5ffe01
......@@ -693,12 +693,11 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration)
suffix = 1000;
microseconds /= 1000;
q += 2;
} else if (*q == 'u') {
} else if (q[0] == 'u' && q[1] == 's') {
suffix = 1;
microseconds = 0;
q++;
}
if (*q == 's')
q += 2;
} else if (*q == 's')
q++;
} else {
int is_utc = *q == 'Z' || *q == 'z';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment