From patchwork Mon Jun 15 03:14:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 20388 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 53A8344A579 for ; Mon, 15 Jun 2020 06:14:47 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2ED5B68B131; Mon, 15 Jun 2020 06:14:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 25068689AA9 for ; Mon, 15 Jun 2020 06:14:41 +0300 (EEST) Received: by mail-wr1-f68.google.com with SMTP id x6so15437928wrm.13 for ; Sun, 14 Jun 2020 20:14:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Shr5zZei0BI+ZTOskBzJhm34B1hWmxHVrTvp0C8X5D4=; b=ObOpOTPywVEXrImYzYl8UboqRHZY0YIY282boiVZs0JX3nLBwuGcmgBtNFXCXj+7xa mQB30FSfjvTHmTsrNgO2bAJEHiOESlvySRrCtvktJsOvlelFB207ph/htsRJVR2/1eqQ LzEMr/kuXD6ibICSXrmfLzEeUk5V+OUBU4TLRGAABdlZSnb2UXMVF4V6nZ7F7VYOr1EH rD604AELXXP43CR/DMwKNQVvzLy4ZmfruBBimSP01GbER4l9A0w/odTc56JbdJ/Cqp4s QE9rX2CKTRufzC4yo8jvbtMPvd1ictCUABEKZ4Ki5GCnzEqUcy1Knx9qT5txpxa4eAaH sVaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Shr5zZei0BI+ZTOskBzJhm34B1hWmxHVrTvp0C8X5D4=; b=GUJygJGUA8FFcQu5BM2XIPgPOpL1LYyxqFIUqbDTeOIJgrpX79Hsq3s6yW8a+uJhj/ Ks9o1B62JP8WE7CiEXedosmqbzoF5+OoWOUQe9Wq15Go++F5xvC7Ccauxqx/nO/JRgqJ dlcLwzTV4VNwT11AZGmEtTcdoAj7/uPHvknhW9ftYVV42UNzxoXEs2hJWwr/yLEALn/Q mZslIZ2y5vlY2CWLVkggKh/cUcHbm5rdWpliuWoMo//w3ekPxcS0ElyOfLDpu7TSo8tC rWGAfyRnsKB8rMaTt9x9UPC5OcLyF71WmeSqE6QkrI/9CTKYLsJgqUrE9IuxP6U1de9f oMwg== X-Gm-Message-State: AOAM5306/0QK4T/nUjVfNQJOu35F3A8PP2xI4nzx7DPJHDAHTfmgqpxF 0fRlFCi0vU/+p3SG/6D2b84TI9H3 X-Google-Smtp-Source: ABdhPJxFYUubEAs1IxtZ/e85wZxPON+aU0kKkhvWsTNE/Nvw931CKltaSAeECWgPVpt4kDUZnT2oOg== X-Received: by 2002:adf:9c12:: with SMTP id f18mr28599103wrc.105.1592190880284; Sun, 14 Jun 2020 20:14:40 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1ab57.dynamic.kabel-deutschland.de. [188.193.171.87]) by smtp.gmail.com with ESMTPSA id p1sm21703935wrx.44.2020.06.14.20.14.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jun 2020 20:14:39 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 Jun 2020 05:14:32 +0200 Message-Id: <20200615031432.26565-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/hlsenc: Always treat numbers as decimal X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" c801ab43c36e8c4f88121aa09af26c77bcbd671b 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 --- libavformat/hlsenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 18256cbf91..71fa3db060 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -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);