From patchwork Sat Sep 22 00:41:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 10434 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:1286:0:0:0:0:0 with SMTP id 6-v6csp41524jap; Fri, 21 Sep 2018 17:42:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV62kBn2EkX1E+m0HcKhczrVn81SwPo23D58Q2/kCTUCm1zmTnfg78KuT5LFrCT2klsWINoEq X-Received: by 2002:a1c:64c:: with SMTP id 73-v6mr73220wmg.7.1537576940551; Fri, 21 Sep 2018 17:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537576940; cv=none; d=google.com; s=arc-20160816; b=UxsNCPJ9AASCxIf9nd0+tc3RlrE1fJWwAX/lkIVJHaefSLsQgLutFscWZyX3yrs5kq ocrJcvIafYx8IlbwUbUUKSExHUu5R4TZa1jzP8MjOfDqIS6sVAjDADLVmN7Fk5+83Mw8 G6vgzlYQw1JfGsR5ztsK785vYv5e2GBYl/KhMJGFWOsP4aJjKI3GY1hqKpjnqnpcjPup gyhGeVPxG5CybdJyEFROd/+H+UltVF+b0GnxfDTbpFegD1QhBeit/TxTw9O8PY0v4Bg0 yzqzazkZTTHj6Ob7WFgknSqMk1EFlNz8KqHxT+OTi792JBaUf7BHVzpU5yG1J+Jpt46e iIVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=BHgOfDGED4uhJ9wzpi1dRc2xKBEq1lGQRHP0SpWSEgU=; b=RcrJ+A6cnaI1dptVFTo1mX8aIgTnKfYVLzn5gbGY5l2Z2uI1g34FEwHGTWc4DPIj+6 QuuwGGAkz8XPq6ZHnsZ4tsxh2EqdjrrYLxe09qnk+fNjT8O28TQPFp4IPRzbTihnOctO VQfhhloWXi1iGW9ULT9bpBsUozlgLmR1HkYt31l28XtG34vO6UeuE9WKIfW9lEQu4CxG Cn+Z4WZeasiTc7bBAPm10Ay/0g6axftxtvTwY5hqou9Uw5UiQcCIsEe/lEsc82cGOLVO qJq6xokp3Tk67+277Dm+oYNalNQ8V+kgtt+lk7/i6T9+UVjJZMb4Th6U7rHtEsaS7f2L 2cSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=DIVyB4qs; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u9-v6si2073716wmg.188.2018.09.21.17.42.18; Fri, 21 Sep 2018 17:42:20 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=DIVyB4qs; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D6F8A68A59E; Sat, 22 Sep 2018 03:42:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A6B1268A57D for ; Sat, 22 Sep 2018 03:41:56 +0300 (EEST) Received: by mail-qt1-f176.google.com with SMTP id k38-v6so3531432qtk.11 for ; Fri, 21 Sep 2018 17:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=43h6U/K+75egRDPxUZ0c2d1Zp5mQFri990y+0amiw0M=; b=DIVyB4qsKYPxMxZmijY50e6Y1gbEtFxLTtFykh9Y4UCHW9XpqMHHAh/avj6qe5bipn nj2T8n440p4f4g+sFSmkaiU36Wwd4qhZ1BNOGx561x8zi5z+/U/aMGULehDw+VHtvJo9 8udHTOBm6lqIeKn0VvhrdalosgD2+BknuAvbKFkr1b4Y5F7UZHBfq/yksRNA0XvwrZcm JnQZcs1EkyUtNt+68lPI06aTxY3ecMd2coRD3//vImx3mc6lZX95mZTKOSqwCCix2O+q MFEEQb+FOeJjv0LB7RKhhO6x6YfzAP8qMWkdB8nhalyJIw76WrS0Ryf+jU/ckPv7eAtC 3vJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=43h6U/K+75egRDPxUZ0c2d1Zp5mQFri990y+0amiw0M=; b=q4q8RRcbrjTlLGR/PtdxplYMMOiM488D9k0YK/mAvzwbu29lFP7L5rX7mRQHscaq/8 rjVXsn/S4P6sDb9iM68g8aydKS0uyNjib0DetStYD+Baad+ehlS/qzb4vCUSyZYKRNH1 OFJDKIzF2lUQMYgO2/rFM3/VZctSNVoWyoOJyFqz4MKu4SMzR+wLRR1Pg7QkYVgEoCi7 3tC0VCYd0ssn4qS32HnJICgY7Th0yYTx0zQV2qGFu4oxwLYuDBDNFWgRiTGh5FCaHCGO Wma041HbpR/fnCLT3MPh5YhArLDhjpubV4Y1fklvwtZQe8FJZUclAQA2J01sAJSBnDJm 1iRQ== X-Gm-Message-State: ABuFfoh0ONzTq8AefcieV1mT7AySEBL5j+zJAOf9nWkJD5PmQoSFwfxL uCXWz/0K845EtRSyx5XXJEGZlTyp X-Received: by 2002:aed:2e24:: with SMTP id j33-v6mr148430qtd.180.1537576929942; Fri, 21 Sep 2018 17:42:09 -0700 (PDT) Received: from localhost.localdomain ([179.38.139.56]) by smtp.gmail.com with ESMTPSA id g39-v6sm20564389qtb.90.2018.09.21.17.42.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 17:42:09 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Sep 2018 21:41:54 -0300 Message-Id: <20180922004154.2884-1-jamrial@gmail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180921212922.8836-1-jamrial@gmail.com> References: <20180921212922.8836-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/6] avformat/matroskadec: also check ff_webm_codec_tags for valid CodecIDs 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" Signed-off-by: James Almer --- libavformat/matroskadec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e6793988e1..16a326dff4 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2188,6 +2188,14 @@ static int matroska_parse_tracks(AVFormatContext *s) } } + for (j = 0; ff_webm_codec_tags[j].id != AV_CODEC_ID_NONE; j++) { + if (!strncmp(ff_webm_codec_tags[j].str, track->codec_id, + strlen(ff_webm_codec_tags[j].str))) { + codec_id = ff_webm_codec_tags[j].id; + break; + } + } + for (j = 0; ff_mkv_codec_tags[j].id != AV_CODEC_ID_NONE; j++) { if (!strncmp(ff_mkv_codec_tags[j].str, track->codec_id, strlen(ff_mkv_codec_tags[j].str))) {