Browse Source

parseutils: fix discarding const attribute warning

tags/n2.2-rc1
Vittorio Giovara 12 years ago
parent
commit
6b45f05ef5
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      libavutil/parseutils.c

+ 4
- 2
libavutil/parseutils.c View File

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



Loading…
Cancel
Save