#include "random_seed.h"
#include "parseutils.h"
-#undef time
-
#ifdef TEST
#define av_get_random_seed av_get_random_seed_deterministic
if (*p)
p++;
height = strtol(p, (void*)&p, 10);
+
+ /* trailing extraneous data detected, like in 123x345foobar */
+ if (*p)
+ return AVERROR(EINVAL);
}
if (width <= 0 || height <= 0)
return AVERROR(EINVAL);
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;
++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);
#ifdef TEST
-static uint32_t random = MKTAG('L','A','V','U');
+static uint32_t randomv = MKTAG('L','A','V','U');
static uint32_t av_get_random_seed_deterministic(void)
{
- return random = random * 1664525 + 1013904223;
+ return randomv = randomv * 1664525 + 1013904223;
}
-#undef printf
-
int main(void)
{
printf("Testing av_parse_video_rate()\n");