From patchwork Sat Feb 9 00:24:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 12003 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 77372447EEB for ; Sat, 9 Feb 2019 02:24:44 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 59FC868A7B4; Sat, 9 Feb 2019 02:24:44 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it1-f170.google.com (mail-it1-f170.google.com [209.85.166.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 685CC68A711 for ; Sat, 9 Feb 2019 02:24:37 +0200 (EET) Received: by mail-it1-f170.google.com with SMTP id i145so13291986ita.4 for ; Fri, 08 Feb 2019 16:24:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=9mKwVnRdt5CYuyd3sleekWVZppAFDXANDBmVfGnRGZA=; b=UDqjY61VDHoDYbx+Dbt00vwfPvPkas9HvNJxSgB8dsdZp7JiKcL9NLnJDZAlQpEn9R XTL33DKZ5vqj2qBvwxyReB6pa7Nt9B7sDssAZbWSqJ8EzB7ZcDXT83PT8DS7H4gii0VE HmdpTziwe19sM079LK0G21CaLHbnRsGe90CTbSvNP+trRZKH3DS/T69Q1GeCzflNvj0s V6Fg4Rcn474z6X/GL0D6z3z6pkgJkXUmKAvH/pJY9IVWvepNcslfWeG6Z8XuktLNnMak z2BuywgigIoUM4oXFgcwfJ30H5QWa82EfpCq/gNAW6Lg9h9NyUzmqf4EfQ6aUsDBYiTR 0KuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=9mKwVnRdt5CYuyd3sleekWVZppAFDXANDBmVfGnRGZA=; b=eGYq9cTcVpQxPI/Pou7mvW+n3Uu4h7JxlkK9Uyaiqlxp/MfLC58ZdpL2Fx8QMU4nQ2 YfwVxtdMPnhWlnEVjxXyx5QhZrU7GkNylxQrS772N9KqgkFGvYvaZr+ZY+ONyYbbN7Yt dP2Es29/wHp0NKpklfcmm6gmxNbcmTAPg21cbSWVKZLDVR40NENM4B2GzePKxCNDlJop upuVFdwdM9HnBonud/fwTB+EqOOC3P4vKrr4DYiOkMaOPH4hOQTQ5vwOXvw+Wk1c1hAM 6pTj6/m91Nhh9YeihorU63O3L9rVZuvo9DtLpMwHmymgaqEgU3qMGWboZNGfpq00yrBX rv4A== X-Gm-Message-State: AHQUAua6WUOLR1mNoaetQuB9bgLQsCzzBPihgPVYvpgyG7elQOQS4L6O Ymg3NW/94+s2xyqce1rNFeqWWCiIb+aUSqVuqHg2Wg== X-Google-Smtp-Source: AHgI3IaskrY9di+PFLwaUFeec3AXKtzV3ULzRRug8eI+oWMdG6nrzHdvHy08HMAYwe3aoXV3gEg+k9qMC6IFen8VFz4= X-Received: by 2002:a24:100d:: with SMTP id 13mr685215ity.58.1549671875691; Fri, 08 Feb 2019 16:24:35 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a02:c890:0:0:0:0:0 with HTTP; Fri, 8 Feb 2019 16:24:35 -0800 (PST) From: Carl Eugen Hoyos Date: Sat, 9 Feb 2019 01:24:35 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavu/parseutils: Allow to parse >100 hours 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi! Attached patch fixes ticket #7721 for the reporter. Please comment, Carl Eugen From ba6abc57d563bcc22607ff5d9f77fdce76000bf6 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 9 Feb 2019 01:20:43 +0100 Subject: [PATCH] lavu/parseutils: Allow to parse >= 100 hours. Reported and tested by gamnark. Fixes ticket #7721. --- libavutil/parseutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c index 59bec6c..167e822 100644 --- a/libavutil/parseutils.c +++ b/libavutil/parseutils.c @@ -504,7 +504,7 @@ char *av_small_strptime(const char *p, const char *fmt, struct tm *dt) switch(c) { case 'H': case 'J': - val = date_get_num(&p, 0, c == 'H' ? 23 : INT_MAX, 2); + val = date_get_num(&p, 0, c == 'H' ? 23 : INT_MAX, c == 'H' ? 2 : 4); if (val == -1) return NULL; -- 1.7.10.4