From patchwork Mon Jul 20 17:25:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 21203 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 9C5DD44B5F9 for ; Mon, 20 Jul 2020 20:26:07 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 763E168B9FE; Mon, 20 Jul 2020 20:26:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BF2C768B8C8 for ; Mon, 20 Jul 2020 20:26:00 +0300 (EEST) Received: by mail-ej1-f66.google.com with SMTP id n26so18953224ejx.0 for ; Mon, 20 Jul 2020 10:26:00 -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=F8a8fao2pGBEhY3K+LtAxB9Ul5jfO/ZqcfC8o8HZNI4=; b=Bdzcb9c9SeVZZhxvzi5XuPVYO2OXaCqAc6yKxxVL3Aq40TCCuye7MUHjLPgBdbHbdC LhfW0IhzlT32aG2SZsIouZjevZAVZiq3U5+KXdGOOVh8CjjYdPg0dptE4Ni+weLZEW9a Cu9sIzv6Ap3jk+t3G7HzWUFcbCmm5zfzAL/5IIeFJhBF9v8tmgVobRqJWjB9fWPAmdJN ZWniCMA5edxwfssin4aHAEyW7gkaWZNE/uJ0XNcDkrQxZEolbKG6ltPJgxLViV3XRx6h VB3i+GOkiToqEEkRF4URKsDS+RYg0ssrVM0EOs4dkjdSBcl7xwU/mCZGO5iV99pnvm/S ehyQ== 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=F8a8fao2pGBEhY3K+LtAxB9Ul5jfO/ZqcfC8o8HZNI4=; b=eVAv8rGmwfpWF/IEBx8PuPL5F4UGwuGGd9vIKfkYqa2lC5CCb22CR92rLqEP6zv04C weuo4QBI5mFKnfLQpRQ441R40OMq9XIBivJjdoagtL5mXmttZSf8ihBPK7/T/DwSHmyy EEuvbSebnMo7RHsQiHyRJC/18tTzvsqUQfbMB4uX/RwWH5DdJxGDiRo+hs0gh0s7LIqF XR3ZlOdyTT4D+sBtNXrNOGrmvUNUHR77ZvTlivMu4xZs6Y2Los0QqwNpuCNe7orsNm3x GlfNRqjYWDCFdYqN+P03eyp1YbgsMAOkHEczpCTDOq6j3gaUMqcVIcKO81AEaWzoON0d kfkw== X-Gm-Message-State: AOAM5319Xr+g0/0BMsyhrgKsyaNZtZeKVcJ3jTKd046hHfUCLxDkW611 mYQIomitK2ebNygCTHlVPM9drPbT X-Google-Smtp-Source: ABdhPJxDKsHD/rdBu8b4iRV9XGqq8FAK/FCe8jrZWQ01+9Jpa61sNCnY71zpJf7iqtf79yLT1LNASw== X-Received: by 2002:a17:906:2287:: with SMTP id p7mr22134696eja.537.1595265959770; Mon, 20 Jul 2020 10:25:59 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc10296.dynamic.kabel-deutschland.de. [188.193.2.150]) by smtp.gmail.com with ESMTPSA id b24sm2154940edn.33.2020.07.20.10.25.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 10:25:59 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 20 Jul 2020 19:25:51 +0200 Message-Id: <20200720172551.24500-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/matroskadec: Slightly simplify version check 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" Signed-off-by: Andreas Rheinhardt --- Will apply this triviality in two days if there are no objections. libavformat/matroskadec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 6abb5412de..b1ef344aa7 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2027,12 +2027,12 @@ static int matroska_parse_flac(AVFormatContext *s, static int mkv_field_order(MatroskaDemuxContext *matroska, int64_t field_order) { - int major, minor, micro, bttb = 0; + int minor, micro, bttb = 0; /* workaround a bug in our Matroska muxer, introduced in version 57.36 alongside * this function, and fixed in 57.52 */ - if (matroska->muxingapp && sscanf(matroska->muxingapp, "Lavf%d.%d.%d", &major, &minor, µ) == 3) - bttb = (major == 57 && minor >= 36 && minor <= 51 && micro >= 100); + if (matroska->muxingapp && sscanf(matroska->muxingapp, "Lavf57.%d.%d", &minor, µ) == 2) + bttb = (minor >= 36 && minor <= 51 && micro >= 100); switch (field_order) { case MATROSKA_VIDEO_FIELDORDER_PROGRESSIVE: