OSDN Git Service

Merge commit '6b45f05ef5b241fd1513702119af9c30056a0ac5'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Dec 2013 18:11:07 +0000 (19:11 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Dec 2013 18:12:33 +0000 (19:12 +0100)
* commit '6b45f05ef5b241fd1513702119af9c30056a0ac5':
  parseutils: fix discarding const attribute warning

Conflicts:
libavutil/parseutils.c

See: fe87b2e79c734a111747a239943c7340f8d3f7d7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavutil/parseutils.c

@@@ -606,19 -553,19 +606,21 @@@ int av_parse_time(int64_t *timeval, con
              ++p;
          }
          /* parse timestr as HH:MM:SS */
 -        q = small_strptime(p, time_fmt[0], &dt);
 +        q = av_small_strptime(p, "%J:%M:%S", &dt);
 +        if (!q) {
 +            /* parse timestr as MM:SS */
 +            q = av_small_strptime(p, "%M:%S", &dt);
 +            dt.tm_hour = 0;
 +        }
          if (!q) {
+             char *o;
              /* parse timestr as S+ */
-             dt.tm_sec = strtol(p, (void *)&q, 10);
-             if (q == p) /* the parsing didn't succeed */
+             dt.tm_sec = strtol(p, &o, 10);
 -            if (o == p) {
 -                /* the parsing didn't succeed */
 -                *timeval = INT64_MIN;
++            if (o == p) /* the parsing didn't succeed */
                  return AVERROR(EINVAL);
 -            }
              dt.tm_min = 0;
              dt.tm_hour = 0;
+             q = o;
          }
      }