From patchwork Sat Jun 3 17:03:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41966 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c51c:b0:10c:5e6f:955f with SMTP id gm28csp2057445pzb; Sat, 3 Jun 2023 10:04:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6KB/0sqlfft3cTeeV7MB9nUPRGdSGV4F/e94COpnS/ycq0f8FvYPonInJkAN46kP7SYpg1 X-Received: by 2002:a17:907:7f1e:b0:973:d80f:ea69 with SMTP id qf30-20020a1709077f1e00b00973d80fea69mr2341615ejc.29.1685811870381; Sat, 03 Jun 2023 10:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685811870; cv=none; d=google.com; s=arc-20160816; b=Q4/ufeOtfNp2GTPSxhWEfYfQzZxpvL7Fs2W6ZBux8vhT/j2ON8+3BEtbWBPT+yhx9+ YhSE0BgfHKDkpoBn60W4aBdgFKgxv8v+dnaoNRkXuDXqe8qeDaaYg89XcwCV3R5KiXwX L7YpCyu+NSu/MtY0bkDxPCOwI07BrVcRKStut8065GZGXDV5kzx0YD6a/oqA5tjXHTFV +v7NrNveIcqQSh349c+G/HsKTycBig+zvG5/Yj+qxsOiqOmtNGH6LCLBGNFEwWfIZRBJ nLRaL9H/Ru+nGURD+JEF3GfNic+6ON8BI//fsB4NvGQ0bHDD4tn1kV08ge//w6quG5CY zz/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=3kn0hbquvf24HQYzOxr/QgRctkXbk4J9TK72DZworyE=; b=NXB6jlbg8H7oYK74OxKLz2cAPfYs2mGJtoh8+OfA90NSSKXwmEYEp913jHQ9WW6yTB qXTW5NK93tLnmAqTLSHUwdMBqm/tsscdRAsWHsGZ+KE8Sb4qCA5UFmuUn/xzZiTwvnEO J/gg1oK4cZrTPSd3Guev6Fkb8irGMrrlyUUfETznfBuju/wGAM8o3R1rMn6Xi7BT1uvO jVlFwjT7XxkdHRpWHLfMgVWeeAPj/YNAKn1/D1F5uRg1x2n+FvoFTxep4bcgXRrM7ozI uMOrJUBPq7IVgFjgTQgKp61k0QKgxe8/fEnydV6u204IH5Kh678aBTbfQRK0oILOrPbJ Z+fA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id vj14-20020a170907130e00b00974c32aa1c8si2327561ejb.112.2023.06.03.10.04.06; Sat, 03 Jun 2023 10:04:30 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EC78468C300; Sat, 3 Jun 2023 20:04:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2E9BC68C2B9; Sat, 3 Jun 2023 20:03:51 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id D226F2404EC; Sat, 3 Jun 2023 19:03:50 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id uueHMg0gl2QI; Sat, 3 Jun 2023 19:03:49 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id AECE8240177; Sat, 3 Jun 2023 19:03:49 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 664323A01C0; Sat, 3 Jun 2023 19:03:49 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sat, 3 Jun 2023 19:03:23 +0200 Message-Id: <20230603170323.7215-1-anton@khirnov.net> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] tests/fate/ffmpeg: add tests for -max_error_rate X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: samples-request@ffmpeg.org Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: AzHwfL1444fb --- Please upload https://up.khirnov.net/sq.mkv to mkv/h264_tta_undecodable.mkv. Thanks --- tests/fate/ffmpeg.mak | 6 ++++++ tests/ref/fate/ffmpeg-error-rate-fail | 0 tests/ref/fate/ffmpeg-error-rate-pass | 0 3 files changed, 6 insertions(+) create mode 100644 tests/ref/fate/ffmpeg-error-rate-fail create mode 100644 tests/ref/fate/ffmpeg-error-rate-pass diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index 800f3a03d2..223bc97f8e 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@ -227,3 +227,9 @@ FATE_SAMPLES_FFMPEG-yes += $(FATE_TIME_BASE-yes) # test -r used as an input option fate-ffmpeg-input-r: CMD = framecrc -r 27 -idct simple -i $(TARGET_SAMPLES)/mpeg2/sony-ct3.bs FATE_SAMPLES_FFMPEG-$(call FRAMECRC, MPEGVIDEO, MPEG2VIDEO) += fate-ffmpeg-input-r + +# file with completely undecodable TTA audio stream +# by default should exit with error code 69 +fate-ffmpeg-error-rate-fail: CMD = ffmpeg -i $(TARGET_SAMPLES)/mkv/h264_tta_undecodable.mkv -c:v copy -f null -; test $$? -eq 69 +fate-ffmpeg-error-rate-pass: CMD = ffmpeg -i $(TARGET_SAMPLES)/mkv/h264_tta_undecodable.mkv -c:v copy -f null - -max_error_rate 1 +FATE_SAMPLES_FFMPEG-$(call ENCDEC, PCM_S16LE TTA, NULL MATROSKA) += fate-ffmpeg-error-rate-fail fate-ffmpeg-error-rate-pass diff --git a/tests/ref/fate/ffmpeg-error-rate-fail b/tests/ref/fate/ffmpeg-error-rate-fail new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/ref/fate/ffmpeg-error-rate-pass b/tests/ref/fate/ffmpeg-error-rate-pass new file mode 100644 index 0000000000..e69de29bb2