Commit 6b45f05e authored by Vittorio Giovara's avatar Vittorio Giovara

parseutils: fix discarding const attribute warning

parent 35686a28
...@@ -555,15 +555,17 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration) ...@@ -555,15 +555,17 @@ int av_parse_time(int64_t *timeval, const char *timestr, int duration)
/* parse timestr as HH:MM:SS */ /* parse timestr as HH:MM:SS */
q = small_strptime(p, time_fmt[0], &dt); q = small_strptime(p, time_fmt[0], &dt);
if (!q) { if (!q) {
char *o;
/* parse timestr as S+ */ /* parse timestr as S+ */
dt.tm_sec = strtol(p, (char **)&q, 10); dt.tm_sec = strtol(p, &o, 10);
if (q == p) { if (o == p) {
/* the parsing didn't succeed */ /* the parsing didn't succeed */
*timeval = INT64_MIN; *timeval = INT64_MIN;
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
dt.tm_min = 0; dt.tm_min = 0;
dt.tm_hour = 0; dt.tm_hour = 0;
q = o;
} }
} }
......
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