Browse Source

avformat/hlsenc: Always treat numbers as decimal

c801ab43c3 caused a regression: The stream
number is now parsed with strtoll without a fixed basis; as a
consequence, the "010" in a variant stream mapping like "a:010" is now
treated as an octal number (i.e. as eight, not ten). This was not
intended and may break some scripts, so this commit restores the old
behaviour.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
tags/n4.4
Andreas Rheinhardt 5 years ago
parent
commit
19a876fd69
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/hlsenc.c

+ 1
- 1
libavformat/hlsenc.c View File

@@ -1993,7 +1993,7 @@ static int parse_variant_stream_mapstring(AVFormatContext *s)
return AVERROR(EINVAL);
}

num = strtoll(val, &end, 0);
num = strtoll(val, &end, 10);
if (!av_isdigit(*val) || *end != '\0') {
av_log(s, AV_LOG_ERROR, "Invalid stream number: '%s'\n", val);
return AVERROR(EINVAL);


Loading…
Cancel
Save