From patchwork Thu Apr 15 20:14:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26933 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 09E4A449AE2 for ; Thu, 15 Apr 2021 23:15:00 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C9A6F68A326; Thu, 15 Apr 2021 23:14:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-DB8-obe.outbound.protection.outlook.com (mail-db8eur06olkn2014.outbound.protection.outlook.com [40.92.51.14]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 74437689E14 for ; Thu, 15 Apr 2021 23:14:53 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SXFdsTZFmNKcywkBX7JkqBCha7uw/vAKp4ZbbjIKb804AFpIcXw5iQpyJyU458yKzCH4lwyHA7DSR7P6crm3nO02jnmyoI6J+RdCKopvdl9s/qO0KEMZJBRg92Y7P0kCJtTGkUWyETffEI6OE6Z9wDnzEWYVvRqb3HOVA8thhm+tRL4vpgaNVhBGOMJVN0vnz1Dt7jxKzfMmuak70YGoTyPOFzMYK2dLiKxSQh0NgoxEUm3oUnD3alpqHj2cD6dAsva3lLU3lc67bMQIf/ZU2zsG6Y1ZGzD45jKIiUvHocerdJFGLFLwwDNES6DBLsyUIrEJiVq3uTnDBPzqNSOxDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zypupg7dMk9l5oohF/9VsFpHznxWp5CfPAooHYB9svg=; b=a0Rd1d7c7sEHalUeKdbtQUG6ErcaN992g2c/89eQBh8OR2o57VMBcFbcjcMW+a++B+Viwfd654IG29KngDVdS9TpW487wA5T6BGh8BhLvg0sYJnt/PSre2Ie4TUVDlmFCr1TVRpjq/cRtqPR9uj9U0p8YZBX9JuzV6lW5TnSFCMqIypbGBS2bwHhCvOqnBBojVwvVanEG612+HeWSXD+m80euSsDTsZAOIO3IBfTUBfKZLC3PLNSgTG3Vz/5MeS28A1nk3LzRRYvut5lJz56MYpEzfJeNpiqG+3OzdgTwS4/1s1PnwBPKkbWL4gyE+ZMXDqImgxQh5AgrS0L7OqLsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zypupg7dMk9l5oohF/9VsFpHznxWp5CfPAooHYB9svg=; b=D+0gm4fI1zSnn87q4hfGY8+wgZVU6ds7LjYvG7VKc6qRbnU8875fdi4tdq65d3QRMiT8SrKp+brBNjfbqSnVcwQGRGt5cCromlViCw4jDz4USqiQyxf67Up+wPbFYdhcuOdKpcEG+7whgNHptnvUOQr2bIp32fNSVWVU2a2cbm77pQIFZHh/smcm2zxalhcvYaeE+BV1v0AQBnLMk/u3CGOdrzzXYGbUgKQoXU1FPy+ECkXf8oz/XK3XOfaCCeq+B/e40Vw0AYDl5YSc9Du5OERpi1PXKtoK5b9gmrXJvrC04vwQ3Gt3I68aTCQ53gpBYtIs6lN9ce0/2Cq01XDF7g== Received: from AM7EUR06FT022.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::46) by AM7EUR06HT225.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::507) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 20:14:52 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::53) by AM7EUR06FT022.mail.protection.outlook.com (2a01:111:e400:fc36::388) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Thu, 15 Apr 2021 20:14:52 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:9A19A2C9C504C4C5269FE357517480C4C4FF379F5E4CD7205084A1F740182F25; UpperCasedChecksum:942631F5F098578AB1B744597BAEC86BB350897268114AC2B474431C8F86A060; SizeAsReceived:7405; Count:46 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 20:14:52 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Apr 2021 22:14:30 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 X-TMN: [ugS61Uopo7zrjW64qbNifZRSaXAUkv0I] X-ClientProxiedBy: PR3P192CA0027.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:56::32) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210415201439.1810724-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by PR3P192CA0027.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:56::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Thu, 15 Apr 2021 20:14:51 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8403d6fc-e2de-4052-c836-08d9004b2093 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXFKoSKZyiLYcPwGDHzH9eVIuAkKK+lpADoK7LdCqR8oLvJXHXkDuhPXb831R8v5XtakrzNgYbdF9++24NljBPiT0kCUgWwT9gwc4ru7mUvxXM73M+Cg6DNyKQ/gi/OCICVTHoOGcenYMSBo18s09DG94ZmNbgWEGPe3DUOvcl3iJ/p9pUdBjxap7T+BC1aalUznF65RDDx95qRGfHVg83+bPQf5KtT07TykwNHrm05KdGDgvJp+ho72WRnkZZlM0xvLKBGKtXPJLxLx8pWO9Wi2yXtB4ucB2p3DWpRltVq/5t+T/pLyY+7ZkvLX51thtuLAHYToj6BHRqPR591tunp8j1MtW/UYWiIGWCjmP+RPI3OMewWY39BHvT9xtwUH/L9XPVYkgSSo4w8dWPRXNvVx1tJgsC2dpLqjy7xGOlhKLUkhW1IzAuNw3e5hLdcVjc76Yc0+agfumc794vsPLGbjWOQCME+jgilqqcyoIIgLj0iVb1Ri3cE+MV68KE41MqRSXBWbszPvIwiqpMFAY6Ad8caP34UXqKAv9LxmF/QZzAS0yzkBNPRy3KBjaoAZMYRLo51PuXJKbfnn5THqLa+chbguOC+BYiz4yOwjzoB+dOz2q93vjPQeqBgSNkgUfPCx7b9HD7tFJNhuluRUzhSTUvKTcuMGOyoNO6pmefzN29e2yQMavmhHPGm6pxd5wvCHgqzNP0vWicS6pj2/S0JgKKbAE6H0aM= X-MS-TrafficTypeDiagnostic: AM7EUR06HT225: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9yH8HqnZ1qCbuv6/VY9TMWjd6GSO4nRPuv0riiKtGCYxEzmvmSt/blg4EyXyyJlWN90CODurI9gR11raEvVSgUTRlYtaCzClyEo5jyIGNO0uVXEsHtcI6p1JrVJ8HZHM7K0k/x8QT1KbBs8vC+uofEC7yMM1+WVQtZSUKR/F6wbSM/ce2YZ4V+U90LAYkj41gIVgjNZ3gyDHUXpk5HgJjI6LTD706+lfrNql0RZZ7axpLLCPDFdEbxfBxgiy3nUPtPCQ94jodKHI6CLmwLdqd99d0SMU5/hN6bt9ZGB+Eb7FY8EtDUXecGOU+Z+8z3bc8ahxSYEkk2vffhcEFQmHG3XGqqH6Kb1Y0qsrSEj5GRl/OjKKu3axvVc58VOARS6NVv6e+8X8tIoCe7S3Ow4vtw== X-MS-Exchange-AntiSpam-MessageData: yF5oNFrGTBkio4TANBGERoGiAp/Ai5MMPX06dYuvasQ5eMMi+JC1bCeCBdsmZGSFFSY/SIF+6jAtn24BOWkb5hEzzNaNtVngph7Swbuxp7h6khCc2UG+VBLKHQXhSdjc3Mjy53zv5wYew/6/jpRIdA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8403d6fc-e2de-4052-c836-08d9004b2093 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2021 20:14:52.1077 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT022.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT225 Subject: [FFmpeg-devel] [PATCH 01/10] fate/filter-video: Remove SAMPLES depedency from refcmp tests 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" They don't need it as they use the lavfi device to create their samples. Signed-off-by: Andreas Rheinhardt --- tests/fate/filter-video.mak | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index a0d645cc4a..75ca706738 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -847,16 +847,16 @@ fate-filter-meta-4560-rotate0: CMD = framecrc -auto_conversion_filters -flags +b REFCMP_DEPS = FFMPEG LAVFI_INDEV TESTSRC2_FILTER AVGBLUR_FILTER METADATA_FILTER -FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) PSNR_FILTER) += fate-filter-refcmp-psnr-rgb +FATE_FILTER-$(call ALLYES, $(REFCMP_DEPS) PSNR_FILTER) += fate-filter-refcmp-psnr-rgb fate-filter-refcmp-psnr-rgb: CMD = refcmp_metadata psnr rgb24 0.002 -FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) PSNR_FILTER) += fate-filter-refcmp-psnr-yuv +FATE_FILTER-$(call ALLYES, $(REFCMP_DEPS) PSNR_FILTER) += fate-filter-refcmp-psnr-yuv fate-filter-refcmp-psnr-yuv: CMD = refcmp_metadata psnr yuv422p 0.0015 -FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) SSIM_FILTER) += fate-filter-refcmp-ssim-rgb +FATE_FILTER-$(call ALLYES, $(REFCMP_DEPS) SSIM_FILTER) += fate-filter-refcmp-ssim-rgb fate-filter-refcmp-ssim-rgb: CMD = refcmp_metadata ssim rgb24 0.015 -FATE_FILTER_SAMPLES-$(call ALLYES, $(REFCMP_DEPS) SSIM_FILTER) += fate-filter-refcmp-ssim-yuv +FATE_FILTER-$(call ALLYES, $(REFCMP_DEPS) SSIM_FILTER) += fate-filter-refcmp-ssim-yuv fate-filter-refcmp-ssim-yuv: CMD = refcmp_metadata ssim yuv422p 0.015 FATE_SAMPLES_FFPROBE += $(FATE_METADATA_FILTER-yes) From patchwork Thu Apr 15 20:16:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26935 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 3900044ACE3 for ; Thu, 15 Apr 2021 23:17:15 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 17CB968A3BD; Thu, 15 Apr 2021 23:17:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-AM7-obe.outbound.protection.outlook.com (mail-am7eur06olkn2075.outbound.protection.outlook.com [40.92.16.75]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EFC62689884 for ; Thu, 15 Apr 2021 23:17:08 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kdE4G48oe4aFzvncqNCQeXjuT944ao+7E9m1uXSZbhwck4vVB0KUiHxoA4qG4/aeYc6N/1EWrRUhsEN7/gyS1XgFTKM5+EwnZXHY5gSWS83xsKahkNRCVzHHsT86XjIXemsK+QQA6j2KzyUtgf4xJhMUfI8hpb9Gr8CuFn91aUYAY/52mT8Jul3OosIkiDnyj6fSSBTvKAM26kfIKenLzL4A+GYLjanVFitstaNgW2RhSPKQJr7HW+zJjNR45P4eRjDhj5q96/cAT/1jDAX0GK5zvWGKhx7f9ZwDBwqFm4LHCmiQ8uYO2UI7SApWGXVycTEKqndIxunAil+yVrwNdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KEJKUarirk4wLX0dlsQR7PGP6PQF99BBs4sxU93j1kE=; b=Ar3xB5Q/rw2yEhgh0eYjlO7hNEZ9hdM0Dc+NIcE3FvVeg+eabYxIxsAnHhkQW6mVd+tj1LmvIO+91wCdR2ppjp83SYNFxlzTh/Axm0d8k7t9g7Sm83iBWlMQ7qb5FNMqhzb/JSFNyYv/voywajlrAL3hgSUCR2zx/j121KyT5nQUdJDTXCCoIy5igfjhX/U+hjhphRi9F5LdxEU8GxvotGImAw7/WpeMRgBLxAs9YsVYtbNbLFIKEu9cG2lI3I/KJ1zgqizyF7QWL6t9a1CqHNE0N3Scjer3BiiHJZBELsgDcdVt/uaW64gg1WcBmvRNOs7e5f4TimPulAXG0yxe4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KEJKUarirk4wLX0dlsQR7PGP6PQF99BBs4sxU93j1kE=; b=RojVPnKu/emgnIYE4mKTJFvT+3si5ZgDDsClwpCE4tzgHaxK/PaPP9BK53/DNUwPEUyojkEACECNKfdIzNgz4f5tavBuTsLCnbIr4M0qkAhpIknOwiQXw69o3BFzV4HuzUvetui/I8EBzN54xjFn+DaxiAvrxlDjFWawEOfJnjjb1EZvPINVF2wzyx7PzHM2HLnS078vBqtnpz6JGqUdJQef7CW9VFtIxtYwjC084a5oCTD7+7XugmIKyFcCY4C2lIoJN4OAALLG5cDtcPtJqnQdVsZGKzPFkbydq1J2IQ0xgKz2AqTQ+3rAMmoCzOi+pfdWgst0KR+M+a9b5qOLsA== Received: from AM7EUR06FT022.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::41) by AM7EUR06HT236.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::279) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 20:17:07 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::53) by AM7EUR06FT022.mail.protection.outlook.com (2a01:111:e400:fc36::388) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Thu, 15 Apr 2021 20:17:07 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:18476016F6EDBD737853057C945FF392CC2262379C842F77816A0E3140EEE1DB; UpperCasedChecksum:1F002696C7DB64695841D3164F700E54E408D8B2A6807778C09293A6B72357C1; SizeAsReceived:7580; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 20:17:07 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Apr 2021 22:16:51 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [7Ei9dBStfIW9WgICV8WilRfCXJO16GRP] X-ClientProxiedBy: AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210415201659.1810798-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18 via Frontend Transport; Thu, 15 Apr 2021 20:17:06 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: c8acb42d-133b-41e8-2682-08d9004b713a X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXFKoSKZyiLYcPwGDHzH9eVdHrr/53rHKpoaw4NCXJ+3iJ7ujRTlscNXbCbFj9oBRHiWlacrrRAsfrLRaYGu0Zrj40pwXEytniANGtvHznjSuuHaWHz7SQXSIBNapK5sw8NMbCZz+UCTX80FOpS6WjWXv3/C5xR2LbAfnpWqBUHygE5KquOKALJTJXBfX0+TFt7On7xWm1RhIuaRSjMADUJn5bJfNH5iUKdlclbidZzbWUHeAMa+Ikzyn0Dp7UBr7ntxvK4TSBJ32s6lJmh5Qh1kH2i2AsjxOJz2c0LQeToADJWqXIQegj//sZZyqnv2Q2PhPxOtAmUKr7GD5gzdjLGLBxsby+05gK35yR9Cwl4H8E6pt9zliljBwU3K0F3lyRa/Wx/9o+/F6s3ggYPbKyj2gZpYL7aPYkLCMJQ+nTSpxClcmUynm9yaTGxUiQeKgerxlWs8xFqvvXn+H8rlEGl8vK33EqRpW+v3S6LvOV4E0eRherDFH3fndTawTzyMyv1MXU2DoW0iFn1mb7lDira29G5gikEPHC4VuB9x6JEmb7j0sYLP/R9G50577IkqQtH9XxwTwPy64yzVH/7Ftk1dowqTcU2Zl5iXd/SvBVnsA+NU8HiQiT3m8VUelCrlOjnMohY+xZI5aWVJ9EJUP4+QqQXiA0VHVktBUnIdLlCku0TfJPKND+9l8Kb5lcyua2+vruYQeeEvH1cx2E+Tzdwrqy/fumyRw4= X-MS-TrafficTypeDiagnostic: AM7EUR06HT236: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ot36rDZf2exY/8n7t8hzWQ4yIj7HawU5x09ugbHljesWsAiwODnzcmZUmhLoO0eUHYez03JAeU4QN1la856c7z8+T3mECdnFzagAVYst4EtHXp2N/hF09BXajOkkuPznLdxly51bYioZiWjLcc9qrr7XATa6sazRMTLapRXdr8gXfN7XMoS4lKlCo4tBrNS2IhEnrA8ujQlrXndYgQRi6C3A4zmILk5L7og9yM9lUppvbwGE94+Et3nrxQh93SNKoVCbaMxReykSN/NgX7OwejN/FmBZ9pazA/rzsJHLQMMpGq8o7Fg050ea5af+qUhOTUMW/Ou56B6soM2j2PesK7HT/7FsIkyuhnQZEl29f1JE6iw1GsEE+OtuSxGMRMmZ X-MS-Exchange-AntiSpam-MessageData: I5P13roFeAzya6TzQUqUakeN5jE75njO5bYghp0D0JqtBJVGSqOHSA9PU2XC8WOk+MMyJdbU3hQrffo3lrRKnFy4BwyGpdRSp/LCad64saKmeNoWJonT0AtsTr5S8Sr2tdnLoEtrGDaxT6wxfrZalw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8acb42d-133b-41e8-2682-08d9004b713a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2021 20:17:07.3738 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT022.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT236 Subject: [FFmpeg-devel] [PATCH 02/10] fate/mov: Add test for muxing cover images 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 --- tests/fate/mov.mak | 12 ++++++++-- tests/ref/fate/mov-cover-image | 43 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 tests/ref/fate/mov-cover-image diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak index 957bd5ca4e..4c1014be92 100644 --- a/tests/fate/mov.mak +++ b/tests/fate/mov.mak @@ -37,8 +37,6 @@ FATE_SAMPLES_AVCONV += $(FATE_MOV) FATE_SAMPLES_FFPROBE += $(FATE_MOV_FFPROBE) FATE_SAMPLES_FASTSTART += $(FATE_MOV_FASTSTART) -fate-mov: $(FATE_MOV) $(FATE_MOV_FFPROBE) $(FATE_MOV_FASTSTART) - # Make sure we handle edit lists correctly in normal cases. fate-mov-1elist-noctts: CMD = framemd5 -i $(TARGET_SAMPLES)/mov/mov-1elist-noctts.mov fate-mov-1elist-1ctts: CMD = framemd5 -i $(TARGET_SAMPLES)/mov/mov-1elist-1ctts.mov @@ -127,3 +125,13 @@ fate-mov-faststart-4gb-overflow: REF = bc875921f151871e787c4b4023269b29 fate-mov-mp4-with-mov-in24-ver: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_entries stream=codec_name -select_streams 1 $(TARGET_SAMPLES)/mov/mp4-with-mov-in24-ver.mp4 fate-mov-mp4-extended-atom: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_packets -print_format compact -select_streams v $(TARGET_SAMPLES)/mov/extended_atom_size_probe + +FATE_MOV_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL MOV_DEMUXER MJPEG_DECODER \ + SCALE_FILTER PNG_ENCODER PNG_DECODER \ + MP4_MUXER FRAMECRC_MUXER PIPE_PROTOCOL) \ + += fate-mov-cover-image +fate-mov-cover-image: CMD = transcode mov $(TARGET_SAMPLES)/cover_art/Owner-iTunes_9.0.3.15.m4a mp4 "-map 0 -map 0:v -c:a copy -c:v:0 copy -filter:v:1 scale -c:v:1 png" "-map 0 -t 0.1 -c copy" "" "-show_entries stream_disposition=attached_pic:stream=index,codec_name" + +FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_MOV_FFMPEG_FFPROBE-yes) + +fate-mov: $(FATE_MOV) $(FATE_MOV_FFPROBE) $(FATE_MOV_FASTSTART) $(FATE_MOV_FFMPEG_FFPROBE-yes) diff --git a/tests/ref/fate/mov-cover-image b/tests/ref/fate/mov-cover-image new file mode 100644 index 0000000000..e65e4ee36f --- /dev/null +++ b/tests/ref/fate/mov-cover-image @@ -0,0 +1,43 @@ +4e92f776010bd7a727c11bf8c34cde1e *tests/data/fate/mov-cover-image.mp4 +1011919 tests/data/fate/mov-cover-image.mp4 +#extradata 0: 2, 0x00340022 +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: aac +#sample_rate 0: 44100 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +#tb 1: 1/90000 +#media_type 1: video +#codec_id 1: mjpeg +#dimensions 1: 600x600 +#sar 1: 96/96 +#tb 2: 1/90000 +#media_type 2: video +#codec_id 2: png +#dimensions 2: 600x600 +#sar 2: 1/1 +0, -2112, -2112, 1024, 6, 0x027e00e8, F=0x5, S=1, 10, 0x02c80048 +0, -1088, -1088, 1024, 6, 0x027e00e8, F=0x5 +0, -64, -64, 1024, 6, 0x027e00e8 +1, 0, 0, 0, 25441, 0xe82503b0 +2, 0, 0, 0, 32657, 0x080255d2 +0, 960, 960, 1024, 6, 0x027e00e8 +0, 1984, 1984, 1024, 6, 0x027e00e8 +0, 3008, 3008, 1024, 6, 0x027e00e8 +0, 4032, 4032, 1024, 6, 0x027e00e8 +[STREAM] +index=0 +codec_name=aac +DISPOSITION:attached_pic=0 +[/STREAM] +[STREAM] +index=1 +codec_name=mjpeg +DISPOSITION:attached_pic=1 +[/STREAM] +[STREAM] +index=2 +codec_name=png +DISPOSITION:attached_pic=1 +[/STREAM] From patchwork Thu Apr 15 20:16:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26936 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 8C79A44ACE3 for ; Thu, 15 Apr 2021 23:17:31 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6B5BD68A4BE; Thu, 15 Apr 2021 23:17:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-AM7-obe.outbound.protection.outlook.com (mail-am7eur06olkn2080.outbound.protection.outlook.com [40.92.16.80]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1A778689EC4 for ; Thu, 15 Apr 2021 23:17:25 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mI/GHgqr6DvZ0Tj7DyzA9R5yaj+/mXJaOrtyVeX/0WBKrjedVO5XYna1NgthdgSl5ShB2irQ8OuEiLVh7cw8uISZL8HAM0ZW6TsxKMd5mxrx0qdmuKSPekBVG+77iBPnXzBpYRumz28rXHEZQKJ0I5Egnuz53857mkWTVyF7z8H+2NgMyShVC1I5W+1rHj3NtaiLOhanYApEi4y5P2mmQSC/LSNV3rKgUFGRMfl91ByQzYLtwN6YrO8Q0/DlGso7HR6YqwPBxSxjgT9aiySDR+OfvK6JsehgktF7NG+nVdt/0KKfEXyLkkRE+F55HzeuZcTfdJDlccQLVVcUXtjWCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=amL6rO4Cn9NdPnsAMXXLNZrGMN8YalUWv+d2dCGVQW0=; b=BiAsM+POclGFgJMe22cl2kPLlrttzT+KcjHHqCrnp97+ud3M3BCps0tReULxCFzTHXtfox7c0mYjBugjgOaqfjnyCU8NL5Fv71Q7l+/8sMd6+/5zLZg73D1ecKtAXX2rQih6TOXMw0dxO2akiwutsM4Py3VA72Iafy8bUiGvWcPku92fFmW5UeEz6TqK0aFmTPxS3oJ3QM1qAFJvhxkIQB27vW/PT596Q2Dy+TFykDrj/kFrKOQVxoewKu1aCOLYTXgKXy7SGpSHQrGbAHSWbKS3EXW6f7s/dslhN2N5Y1xtU6JwC+XnT4JYaP68MHp9ugyFpiS+pm4V+BaGqKXffg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=amL6rO4Cn9NdPnsAMXXLNZrGMN8YalUWv+d2dCGVQW0=; b=ssbubxsd2X87LMlDAgI1vxWSdT8ARLcgoMCy3EvE8dvOjOtUPCYHSojFRu+0y7WUysWhwIIAm3QOxHQKbm8ejub9JrolOuGo2++J0SgECTBJ9fqobQkNMd2j9OSijh2xSRdqkkibhzoSweTjKMtm0DYWvRpC+Wn2jPGv62YGsBxhZ7NbwEhLq9D9bf4TZZIfykDMXtn7AshoJecq/Dh4R37lU8USH6UjwVo8/bZ/DbCCIGD/HbAG7bJwLXQt/U7di2+zvBlJAZA/wsY2I64c/1NcJ3gxHDxKngRIDt3+HSkLG7/2pAWLk4eiWkv++gJ3A23uQeajUrHACHsqlNdYjw== Received: from AM7EUR06FT022.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::49) by AM7EUR06HT164.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 20:17:18 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::53) by AM7EUR06FT022.mail.protection.outlook.com (2a01:111:e400:fc36::388) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Thu, 15 Apr 2021 20:17:18 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:D29FD73486126F853FB375C6EE419CE5189DDAB137D70BB3215205BBE090DF07; UpperCasedChecksum:D15BB1D9F635FF0A91B98B07AD17B2D402EBDBF30B7069CDF2E9A50EBE3425DA; SizeAsReceived:8763; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 20:17:18 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Apr 2021 22:16:52 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [WXKAEV0Y0ucoD8J70ngoqan/ajuZJyd1] X-ClientProxiedBy: AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210415201659.1810798-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18 via Frontend Transport; Thu, 15 Apr 2021 20:17:18 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: e8aee6e4-949a-4a51-3133-08d9004b77e1 X-MS-Exchange-SLBlob-MailProps: =?utf-8?q?7FNIAzWC7ToLWAUhajbk7q2oL1FszNoLIS?= =?utf-8?q?3Q7LANnUVmFsldf2R94K3vERNGpEtJZjIYjE1MziSCytmO1Et5X7IDzg5oHQhO/a+?= =?utf-8?q?rm9c0rMifW2VcUSRM0BZRdXIhVzjz1RK+WhJRqf5Nx5VEr+6pbPb6mhJH+lAto1xn?= =?utf-8?q?JZKxbQv73Rip4RrMBO49szKPv8PqEA9SXOrChlW15Glwotaw9bhRNkVGynzLZUaGe?= =?utf-8?q?KG9z8uTJ/L7QTSZQP4e0s4TVZbadCO5s9ebD+7mI/vapwhQ3GXukNMUDJYazBqwSd?= =?utf-8?q?d5lniU4/ViCxkk+LX3fl7zNi1NaDfkb326QurrTehzAMP5dnZ8Fr99i2YbyktCR72?= =?utf-8?q?S1+FzSCBQlxRrX7ohTx4v7qWDQ03vRwtwHFn5BNBusIIi5LiihtdPduP6rTwbRPX9?= =?utf-8?q?oEUtVTZr3OGKEMRr2kvLhvJSMC0p5d+nVg69NH8JWTUQhfpNnRaay/ddSHf5RT9jr?= =?utf-8?q?KWDTfLvNiZjAqKjw7T1u92SY3JZnZB+QAFFTigw1hUr5Y6BDr/KUsjVnoOXEe+YTD?= =?utf-8?q?8RKHI844pTkgEdYHe4Fi+B3DElaLqdXTMoZElpIqjRU5W++merXEfKImOoHF5kf5S?= =?utf-8?q?BMIdVC28/O+xJpFHO8arNM1+X1g1OpZ8oPlBLYrAASUtnMDfToam2jXMY031jMxA9?= =?utf-8?q?Q5c4pqn+ummUNfEv+DMsYxHAvMDZmdAwCIebBFIQRIIgxsDG5UBo+M5haNTMNQPTO?= =?utf-8?q?U4aKicdkMsrjr4H20nYKVn6W4va4NBgNtsmQN/4k1xc7SiFTjCYPUIEcCHuueQRlR?= =?utf-8?q?72HujUp89nBxny7cRHI2oE8HLqFJ59bMssgf5u/Jaheuj9rS4VWy8Sz40ZhE4OLYH?= =?utf-8?q?UzB0rIZZP5EX1xdtoYVZXTDawT0Oow251/BnAMGicnBbZ4tZOHIaE+8VfJoJ+nwLh?= =?utf-8?q?yfp3KHjWzTx+FJcWEvAX7ZZA4jSStJ7nLRrg/tS2KTIZ5G+nmzj26N6OoDDEpORK5?= =?utf-8?q?bPm2fzTW/ktCVeVbf2VC/O5sZ9+zfNXxYBoFCLQ6vLFguw7kse5u4Qw6KaqxLORku?= =?utf-8?q?2e14Qp+D6u710IcSbnUcwzS6w=3D?= X-MS-TrafficTypeDiagnostic: AM7EUR06HT164: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vYWwxIYuUJhnpFpuTJ8hdaXhuLp8ftGilHlGBGuDzOvbGLzvVPPTDkf0e3KRUUVZ3IxD7Ti7uKOrcgCAe45Org2mf2x9T2cEesmtzO5zy5KFCfLBpVYZHJiqPeNS0hg6JTfTe+r4r3QzQ+83gyzwPmHJ8+wN5MuOBh7gKiKNdTOTW/XHJiGG9P2RN3BeoJZnB6IiscSw0Xak+ulkSIBjqcCh08mPBDmXskO2QiFHmoI3fQqgo5tN9wh/ha0AwwvV5wVeXUZsXNn6rYrFeOhzLoSPWLaH2b3QIGMB0M+Y4dWMaMiBQL1tuCOrAUPASHETaKUEuImTp3BWOwAUfuTv3M+YX7Nk1DjA7aRRY7Nn4iV4Cwg3qLccDM/zue6nbMG9bRaeTNkKp6asMeTa+4JKAA== X-MS-Exchange-AntiSpam-MessageData: j77QHWzckL+JCNOdGWoWUeNrfGIcwdTueU/aRcaGwksUqQeb1ZaiwhXGlS1F14zgzX1dMciGrS7QcB/6WPJlYhGoCtE2Cgj4Dsv8ru5uoTMYYMIZ9iQ+4n6EV/H1VTtp0GL72cgQwIKx8KsFjlWzzw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8aee6e4-949a-4a51-3133-08d9004b77e1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2021 20:17:18.5479 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT022.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT164 Subject: [FFmpeg-devel] [PATCH 03/10] fate/cover-art: Add test for writing id3v2 tags and apic with AIFF/MP3 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" Notice that the order of the APIC tracks is currently wrong. This is a superposition of two bugs: (i) Both muxers write the attached pictures in the order they arrive in the muxer and not in the stream_index order, leading to attached pictures that are copied being written earlier because their timestamp is AV_NOPTS_VALUE, whereas the timestamp of the encoded pictures is 0. (ii) A bug in the id3v2 parsing code reverses the order of the parsed pictures. Signed-off-by: Andreas Rheinhardt --- tests/fate/cover-art.mak | 21 +++++- tests/ref/fate/cover-art-aiff-id3v2-remux | 82 +++++++++++++++++++++++ tests/ref/fate/cover-art-mp3-id3v2-remux | 55 +++++++++++++++ 3 files changed, 156 insertions(+), 2 deletions(-) create mode 100644 tests/ref/fate/cover-art-aiff-id3v2-remux create mode 100644 tests/ref/fate/cover-art-mp3-id3v2-remux diff --git a/tests/fate/cover-art.mak b/tests/fate/cover-art.mak index 721c650b78..c42a4bc499 100644 --- a/tests/fate/cover-art.mak +++ b/tests/fate/cover-art.mak @@ -30,9 +30,26 @@ FATE_COVER_ART-$(CONFIG_WV_DEMUXER) += fate-cover-art-wv fate-cover-art-wv: CMD = md5 -i $(TARGET_SAMPLES)/cover_art/luckynight_cover.wv -an -c:v copy -f rawvideo fate-cover-art-wv: REF = 45333c983c45af54449dff10af144317 +# Tests writing id3v2 tags (some with non-ASCII characters) and apics. +FATE_COVER_ART_REMUX-$(call ALLYES, FILE_PROTOCOL FLAC_DEMUXER MJPEG_DECODER \ + FLAC_DECODER SCALE_FILTER PNG_ENCODER \ + BMP_ENCODER PCM_S16BE_ENCODER AIFF_MUXER \ + AIFF_DEMUXER BMP_DECODER PNG_DECODER \ + FRAMECRC_MUXER PIPE_PROTOCOL) \ + += fate-cover-art-aiff-id3v2-remux +fate-cover-art-aiff-id3v2-remux: CMD = transcode flac $(TARGET_SAMPLES)/cover_art/cover_art.flac aiff "-map 0 -map 0:v -map 0:v -map 0:v -c:a pcm_s16be -c:v:0 copy -filter:v:1 scale -c:v:1 png -filter:v:2 scale -c:v:2 bmp -c:v:3 copy -write_id3v2 1 -metadata:g unknown_key=unknown_value -metadata compilation=foo -metadata:s:v:0 title=first -metadata:s:v:1 title=second -metadata:s:v:1 comment=Illustration -metadata:s:v:2 title=third -metadata:s:v:2 comment=Conductor -metadata:s:v:3 title=fourth -metadata:s:v:3 comment=Composer" "-map 0 -c copy -t 0.1" "" "-show_entries format_tags:stream_tags:stream_disposition=attached_pic:stream=index,codec_name" + +FATE_COVER_ART_REMUX-$(call ALLYES, FILE_PROTOCOL MP3_DEMUXER MJPEG_DECODER \ + SCALE_FILTER PNG_ENCODER BMP_ENCODER \ + MP3_MUXER BMP_DECODER PNG_DECODER \ + FRAMECRC_MUXER PIPE_PROTOCOL) \ + += fate-cover-art-mp3-id3v2-remux +fate-cover-art-mp3-id3v2-remux: CMD = transcode mp3 $(TARGET_SAMPLES)/exif/embedded_small.mp3 mp3 "-map 0 -map 0:v -map 0:v -c:a copy -filter:v:0 scale -filter:v:2 scale -c:v:0 bmp -c:v:1 copy -c:v:2 png -metadata:s:v:0 comment=Band/Orchestra" "-map 0 -c copy -t 0.1" "" "-show_entries stream_tags:stream_disposition=attached_pic:stream=index,codec_name" + FCA_TEMP-$(call ALLYES, RAWVIDEO_MUXER FILE_PROTOCOL) = $(FATE_COVER_ART-yes) FATE_COVER_ART = $(FCA_TEMP-yes) - $(FATE_COVER_ART): CMP = oneline + FATE_SAMPLES_AVCONV += $(FATE_COVER_ART) -fate-cover-art: $(FATE_COVER_ART) +FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_COVER_ART_REMUX-yes) +fate-cover-art: $(FATE_COVER_ART) $(FATE_COVER_ART_REMUX-yes) diff --git a/tests/ref/fate/cover-art-aiff-id3v2-remux b/tests/ref/fate/cover-art-aiff-id3v2-remux new file mode 100644 index 0000000000..207721fc71 --- /dev/null +++ b/tests/ref/fate/cover-art-aiff-id3v2-remux @@ -0,0 +1,82 @@ +d4a9481090a8bab1a3f072a8108a1d6a *tests/data/fate/cover-art-aiff-id3v2-remux.aiff +608914 tests/data/fate/cover-art-aiff-id3v2-remux.aiff +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16be +#sample_rate 0: 44100 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +#tb 1: 1/90000 +#media_type 1: video +#codec_id 1: bmp +#dimensions 1: 350x350 +#sar 1: 0/1 +#tb 2: 1/90000 +#media_type 2: video +#codec_id 2: png +#dimensions 2: 350x350 +#sar 2: 1/1 +#tb 3: 1/90000 +#media_type 3: video +#codec_id 3: mjpeg +#dimensions 3: 350x350 +#sar 3: 1/1 +#tb 4: 1/90000 +#media_type 4: video +#codec_id 4: mjpeg +#dimensions 4: 350x350 +#sar 4: 1/1 +0, 0, 0, 1024, 4096, 0xdac4695d +1, 0, 0, 0, 368254, 0xfa7f4bd8 +2, 0, 0, 0, 184497, 0xc33f8d44 +3, 0, 0, 0, 19650, 0xd5662610 +4, 0, 0, 0, 19650, 0xd5662610 +0, 1024, 1024, 1024, 4096, 0xad05c909 +0, 2048, 2048, 1024, 4096, 0x97e3b8f8 +0, 3072, 3072, 1024, 4096, 0xb08180fa +[STREAM] +index=0 +codec_name=pcm_s16be +DISPOSITION:attached_pic=0 +[/STREAM] +[STREAM] +index=1 +codec_name=bmp +DISPOSITION:attached_pic=1 +TAG:title=third +TAG:comment=Conductor +[/STREAM] +[STREAM] +index=2 +codec_name=png +DISPOSITION:attached_pic=1 +TAG:title=second +TAG:comment=Illustration +[/STREAM] +[STREAM] +index=3 +codec_name=mjpeg +DISPOSITION:attached_pic=1 +TAG:title=fourth +TAG:comment=Composer +[/STREAM] +[STREAM] +index=4 +codec_name=mjpeg +DISPOSITION:attached_pic=1 +TAG:title=first +TAG:comment=Other +[/STREAM] +[FORMAT] +TAG:artist=Мельница +TAG:RATING=0 +TAG:album=Ангелофрения +TAG:title=Дороги +TAG:tracktotal=11 +TAG:totaltracks=11 +TAG:genre=Folk +TAG:date=2012 +TAG:track=2 +TAG:unknown_key=unknown_value +TAG:compilation=foo +[/FORMAT] diff --git a/tests/ref/fate/cover-art-mp3-id3v2-remux b/tests/ref/fate/cover-art-mp3-id3v2-remux new file mode 100644 index 0000000000..a3bc8c7891 --- /dev/null +++ b/tests/ref/fate/cover-art-mp3-id3v2-remux @@ -0,0 +1,55 @@ +c1b55a9a92226cd72d3f53ccd830d127 *tests/data/fate/cover-art-mp3-id3v2-remux.mp3 +399346 tests/data/fate/cover-art-mp3-id3v2-remux.mp3 +#tb 0: 1/14112000 +#media_type 0: audio +#codec_id 0: mp3 +#sample_rate 0: 44100 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +#tb 1: 1/90000 +#media_type 1: video +#codec_id 1: png +#dimensions 1: 263x263 +#sar 1: 1/1 +#tb 2: 1/90000 +#media_type 2: video +#codec_id 2: bmp +#dimensions 2: 263x263 +#sar 2: 0/1 +#tb 3: 1/90000 +#media_type 3: video +#codec_id 3: mjpeg +#dimensions 3: 263x263 +#sar 3: 96/96 +0, -353590, -353590, 368640, 417, 0x15848290, S=1, 10, 0x034e0055 +1, 0, 0, 0, 165671, 0x7c1c8070 +2, 0, 0, 0, 208350, 0x291b44d1 +3, 0, 0, 0, 15760, 0x71d5c418 +0, 15050, 15050, 368640, 418, 0x46f684a4 +0, 383690, 383690, 368640, 418, 0x46f684a4 +0, 752330, 752330, 368640, 418, 0x46f684a4 +0, 1120970, 1120970, 368640, 418, 0x46f684a4 +[STREAM] +index=0 +codec_name=mp3 +DISPOSITION:attached_pic=0 +TAG:encoder=Lavf +[/STREAM] +[STREAM] +index=1 +codec_name=png +DISPOSITION:attached_pic=1 +TAG:comment=Other +[/STREAM] +[STREAM] +index=2 +codec_name=bmp +DISPOSITION:attached_pic=1 +TAG:comment=Band/Orchestra +[/STREAM] +[STREAM] +index=3 +codec_name=mjpeg +DISPOSITION:attached_pic=1 +TAG:comment=Other +[/STREAM] From patchwork Thu Apr 15 20:16:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26937 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 9141844ACE3 for ; Thu, 15 Apr 2021 23:17:34 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7132D68A569; Thu, 15 Apr 2021 23:17:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-DB8-obe.outbound.protection.outlook.com (mail-db8eur06olkn2045.outbound.protection.outlook.com [40.92.51.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0A2EC68A571 for ; Thu, 15 Apr 2021 23:17:28 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iZ5zwRHJKlEvXzZOh4ck9XA62CMbFuUB2U5CaW6xbMkFG+U+9hXfcXMIQ0nwWgtM7FtjbeKBP/JWEP483/8rpQQa6q6d39gH8t0Eg/w6HVbLOSaEYM+IksLs7QOgBhYOjNBRTYqrngsMRZA4XbTKKlw5BBsMCgkOna7KzisOz06TI+tJsAQ3nIuQjeDJngVX54JC3FPrOyYVeEbhfXhoDO3MCRcIeCbA+RQT7bRZGHyUl4PIN0kdQL5JL4bN74o53sNqAePCaliD9wsrav3CnWDIkHec5PNAfjCxg+tUWTGN8xLLRQkfbB5o1kfXbh15BAmDILi67r+ObBtoenR0pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=klvZi9kCgSppo5NbmmALssF5UfrFdwIsIK4q/+jP3zI=; b=EyHD8ywxBse52fiMnY8kMH/oMgATebKTY0WdJBPwic3W4UzXqSsgDe1zbZPfrxMH4dEB5mjDSdDTFBzKY1B7YfzC4JXcOhBV8YlOWIb87/b8t7QMK2BZ0T/QR3SP73sIvb6s0IukxTZA8qu/81dv96tD5xVPvsisiQJaHP+aSvajThUwg6gcgXIg8jNRaEawvoa9eCZrnYkHD8NvtRJeK/642R/iti4+8wKnxSVZasQ7gNTAF6kCDxi+gRiL01US9s0ZefCgXjURebR5mllE2w2YTpuPIfJBd4uTwJVglEDWvT09rGvQ5/wU9xc0VjhCsnFKNs6IjSpI8WTqm52+kA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=klvZi9kCgSppo5NbmmALssF5UfrFdwIsIK4q/+jP3zI=; b=G9mwdxuUYBqJVXwoZ5I9Mpv+OnIkf+N3ekkzJEswwH7IxhJUW5LSHflX/HJ2CvPkfAq78/vqsBlCHpRS6sRU3KnucnSCVsCpuc/P9iR1TNq7V705dDUNuY/tvTOV9NL5lxzzyDfSBz09Rr4jOUuJ0dU4Z1Uakgpb23iy+vLhfHDz40df/94airba5bN7AELG21oCJbL4/IaLzF46B05CQcngeGsd9vsBjnivR8IzOV0drDRqfvNx44F3zgzspc40MEYzLfa78M/AfinrzDkW/Qdrf95+FBPE+L5Bx/DGQDzbzQCsns53VvPdKtoeu7MeDul2sdWV1odHkLDSfisV5A== Received: from AM7EUR06FT022.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::45) by AM7EUR06HT160.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::380) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 20:17:27 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::53) by AM7EUR06FT022.mail.protection.outlook.com (2a01:111:e400:fc36::388) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Thu, 15 Apr 2021 20:17:27 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:93C8B7D1B6BE2A017C30F1CD9C743CC391967FEDF7B684A4FC52E485BB002504; UpperCasedChecksum:8AFAF89D1DC0176D8ECF763D6187A0DD0BC97B50286E946E8355FA74498AB95B; SizeAsReceived:7601; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 20:17:27 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Apr 2021 22:16:53 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [SF9IMb3czbjCNHvytW4uJ33xUi3RluXn] X-ClientProxiedBy: AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210415201659.1810798-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18 via Frontend Transport; Thu, 15 Apr 2021 20:17:26 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: e5bad23c-26b0-4b77-7a67-08d9004b7cf8 X-MS-Exchange-SLBlob-MailProps: ZTmCor6bjd8UfAEv7bxV2BrPJs14GlAeMX0sEzlVtiQ0/PwFDI+6egaYTNMb3mGoezuyjzfYy4rHmh9vVpn27MDug0tOhbu1UavmzEHFyCaqwZx0R8nkpg1u+0uO8LqsB8qbw3kDXXNdmbXJi324Cg3g460UX/40wu/izz+z6rN72x+Nhl+SEg+kZHKVUpG181xH/fczNkiq5xKytNP+anOFdPnxjRqDwXtLh0UbdOxmLAUxrUafW1lGNiJdDjdxKU0peZhKGeIEy7cdgZqxfPoVpvFKI4jDBnJpYPRM9OJnyLiGGyvdSaOWxyV3TVTpyfsk0+rkiYzKpVQkPQR/VJHOpKFSlMmEGL0qf3eCIwnJ0VrzfT7onLdcaf0yxCbtIvNMOJI8OLxBpH61P1KJj1uuVyyPzgCdakOYxJx+jXWXYrH+ihGPg3gE87PE4/tqdDuBY2Et4c3e2wU02Prq2RkCdCBSH2nbH49im1FqrdAGWJ6Zl8ZUW40E3evrRmaeF2e3SglCp/xWesjxfoNzslPoyQaGRgYQh8rHiBNG2r3SdublNsdDmaLmWxzNOl3D/2B/t6RAx+Lc+NEifUbakiInW42+KNuhSTDggwNO0ZQpcRzmcsivIjVS1pEeUcEAYJBGqDiHIfFv0fMGX5DG0q8yq6ah8ADzM+dbWw/J5NWZ/alfSmDTbEJi+fL5VNbHCqn7zA2trm9Ttc3uEyk1xZhjNVD9gKZ+be+w5ZtySZWA0FPcfOhLrwFyfgvn2kwcpGehdU7O/4E3Dmw1ZIXufQlGFMOCho4BO8pjvC3k44wNT/fsqR73tYokO0CQiOR7 X-MS-TrafficTypeDiagnostic: AM7EUR06HT160: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JG3OXBewVl1UYTbogRu17uyI72TKm5jM4+3xO+aadjrp5sT4qfMzzUC7q1RNiuX4+A3WPfz4iSA5o/m/k52Ab+/foVhyR67QInTU9Zo9okqMrjFvoBouriw3Zm53DVFWi6HMFk+smpuU2XUUrCLcVrCRQfqPL6jauVOfIdMZahQd8H+7Iq1TBRu8h4kP+GiLWkSz8Ec+pSL8b52WA2zHQGzHXSx2NVPT5/di7VwyZuO4Lz+NdD3dC48YCi+M05j5Z1WZBLvsXJQakwH33MRy2AVQPDRs6YxzTq/tcmgHirdt9nV4Gr/l3siFTKoa2hBSmqVc4olS9A8/u6AyLtu3GVPbyE3oXxXEdk0Swrf4qj2mDiS+d/Bc2gfpjlikgDBfNmAnOuXyEP6I3c8fkYlq2w== X-MS-Exchange-AntiSpam-MessageData: DCwvk8UaOG2zrU9n7KcqCXQi7MdhbMwdH3BueCkuytAx2tGtpe42jjyJk/NqGqjHK5gkU32lPWjPYaFhrRfEOdDz5SdN12C3ztK1uEZlPsDLWHGa55jrdnmOZgtihBy76bRi7EEtNFILdP0ui6y06g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5bad23c-26b0-4b77-7a67-08d9004b7cf8 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2021 20:17:27.0581 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT022.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT160 Subject: [FFmpeg-devel] [PATCH 04/10] fate/id3v2: Add a test for remuxing id3v2 private tags 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 --- tests/fate/id3v2.mak | 12 +++++++++--- tests/ref/fate/id3v2-priv-remux | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 tests/ref/fate/id3v2-priv-remux diff --git a/tests/fate/id3v2.mak b/tests/fate/id3v2.mak index 873f593d8c..1bf95129bd 100644 --- a/tests/fate/id3v2.mak +++ b/tests/fate/id3v2.mak @@ -1,5 +1,11 @@ -FATE_SAMPLES_ID3V2-$(CONFIG_MP3_DEMUXER) += fate-id3v2-priv +FATE_ID3V2_FFPROBE-$(CONFIG_MP3_DEMUXER) += fate-id3v2-priv fate-id3v2-priv: CMD = probetags $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 -FATE_SAMPLES_FFPROBE += $(FATE_SAMPLES_ID3V2-yes) -fate-id3v2: $(FATE_SAMPLES_ID3V2-yes) +FATE_ID3V2_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL MP3_DEMUXER MP3_MUXER \ + FRAMECRC_MUXER PIPE_PROTOCOL) \ + += fate-id3v2-priv-remux +fate-id3v2-priv-remux: CMD = transcode mp3 $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 mp3 "-c copy" "-c copy -t 0.1" "" "-show_entries format_tags" + +FATE_SAMPLES_FFPROBE += $(FATE_ID3V2_FFPROBE-yes) +FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_ID3V2_FFMPEG_FFPROBE-yes) +fate-id3v2: $(FATE_ID3V2_FFPROBE-yes) $(FATE_ID3V2_FFMPEG_FFPROBE-yes) diff --git a/tests/ref/fate/id3v2-priv-remux b/tests/ref/fate/id3v2-priv-remux new file mode 100644 index 0000000000..0fdd5d9d0a --- /dev/null +++ b/tests/ref/fate/id3v2-priv-remux @@ -0,0 +1,18 @@ +3e99254aa892a9578ce31da17b012a44 *tests/data/fate/id3v2-priv-remux.mp3 +8542 tests/data/fate/id3v2-priv-remux.mp3 +#tb 0: 1/14112000 +#media_type 0: audio +#codec_id 0: mp3 +#sample_rate 0: 48000 +#channel_layout 0: 4 +#channel_layout_name 0: mono +0, -155528, -155528, 338688, 192, 0x3774510e, S=1, 10, 0x00bc0013 +0, 183160, 183160, 338688, 192, 0x856c5b02 +0, 521848, 521848, 338688, 192, 0xb86e557f +0, 860536, 860536, 338688, 192, 0x3b6c5cb7 +0, 1199224, 1199224, 338688, 192, 0xe1bc5c76 +[FORMAT] +TAG:title=id3v2-test +TAG:id3v2_priv.testowner2=\x00\x01\x02 +TAG:id3v2_priv.testowner=testdata +[/FORMAT] From patchwork Thu Apr 15 20:16:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26938 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 99CD844ACE3 for ; Thu, 15 Apr 2021 23:17:37 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7E57468A5AF; Thu, 15 Apr 2021 23:17:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-DB8-obe.outbound.protection.outlook.com (mail-db8eur06olkn2096.outbound.protection.outlook.com [40.92.51.96]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DF25668A40E for ; Thu, 15 Apr 2021 23:17:30 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kJoOlbTi88nkxbawE0+iRo9Hmduv2QnFK+vTRGe/woJW5kvvuw7GESQ7JhnP47NoaQO4ixRwByh4FjopkxZWsppHoVF6Pd6dXP9Rcgooo/7/MSaIqXoUWczvfNEfcVOuipkeBFONgP19DmEln0F/ECKLnS9mujbd6GPJPSygkMcMCd+Qm9RpuQFaZLDl6vBgntK/78qflZKc+Yiit3G6/Bs/jZnLbe1NT3Fds2aX9guyvhVg8oT73aNjI6GtH08x7VxBPKkiWh68GFcracsm5us+3rCvA/IWXaCbXrSbdZQAT25WmTgSl6vyQgkCEhMgcHT4zBx/ZcHkgH46sAdMoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O0Vn8bsrglypPgYWF8DT7Ba6Z5mTq1wsn6HjwfMjdfk=; b=kv6GzE9Il3c7FiNaqIqsYx8HG6fb3veIxL9CSH367keNaCYAFbn5VFmmmZ2sHLxgzUjhqQ/b7QMNYPS44abKlVsqM0OqgJvLqf0tLWJv4TN/s5erzFe7OFKKgt5x4t5GUnHAPzGIWd9HgJCmqL5iYq8JLWyNMTEghHtrxysPlZ9YU8f5f0gkz7rDGjGDXbxrsM4jzuQdYvKoYIfE5qVlknhqmk+lA/YVCCTtzuRR0QTWS3H8rs7nzfSioj0qXTyp6FLxlqc7Vtbt+lTMm2ZYsF197SujqKTqlGlA4lqOC6EjtpY/j1BbI9eHb0dP7HcwnEzeMiTdu+J0bJ6386LSUQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O0Vn8bsrglypPgYWF8DT7Ba6Z5mTq1wsn6HjwfMjdfk=; b=sBuDNch+HQEu+XvCeEe956V1XeGPkDPMX4v4Px8tSHV56t7s0w7JZ8S1GwrZY5mtoqRPfuPm3RaFlnQFtVV1A9p3SFv0WbapiMBq1CPwhj6BlfVUBpXBmaBicZHMXYyNN65Efgv0YLnM3xMQmVVZJ67IsLmX+K0dhxv/wAQ00iexgRoIGLucZ+58DPr7s/nef89n+OKKu4vbg2cEixpHMyMD/XW72TIR3khknlYuzONILc9KudA2V0jVG8J3ZbRM3/7+dMiLnHvJKTHjRMSEW2xg+a2YFE1zcrJ792bWI59csYViESXsKAm6HyYKVyEG2KGS/wKuOkooG50GTG7LaA== Received: from AM7EUR06FT022.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::50) by AM7EUR06HT088.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 20:17:29 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::53) by AM7EUR06FT022.mail.protection.outlook.com (2a01:111:e400:fc36::388) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Thu, 15 Apr 2021 20:17:29 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:10FC7C58FF1E030C54A415FF9CA301EE6154CB622C8DAE4943C8E4841F489D58; UpperCasedChecksum:DBDFB9F4999AC9D4705B837062A9F6172B25E3F1EE25CE31B2177477DBAACF84; SizeAsReceived:7586; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 20:17:29 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Apr 2021 22:16:54 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [DTxZywJHKqxtsQGkuqltzlOCzDr/+e9Q] X-ClientProxiedBy: AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210415201659.1810798-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18 via Frontend Transport; Thu, 15 Apr 2021 20:17:29 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: d8ca4579-9da9-4f3a-be43-08d9004b7e82 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXFKoSKZyiLYcPwGDHzH9eVdYxpe1tw829RtbugVryvznYRGr03OlcRlroRgN6KQZzVWpgmelYW00F1znRihr7kBc03QzB5nC2BTF9vUC7nU+0+XjOFHrX0bjd0aMLR7m8lw0goX80tyPcCQPwWzWRB1X9upGSWH3xaRN9sAPubpZqBMSXsLZ+jvQdpgIIO933f8Ev7umnJ0lmkQoBye/D+dyOvLjNCTDFVyZsL4X+3eqJtXdmk0aY53N5J0PY8XV8IV5b26SRqI9F+b2njNxxAAXepp5twW6sCEGbfi2HJy/qZmDSRatFTXMCemoiVYEVZ+noH3q69YLZveA0FvuCbb6w8Nru38IIpijpt2qz00ZM6RzT85WS/8M1JPgWD2Z867Rn65h5XkdthazDPshFRBr3ezl2HncQicDVWmF9cA8alT4oGBc/4b2cyu1sOAnkJ3ceafW/SuQ2BWnHmA1ugtmaD2Eyeb2b1CnYqjjP+cwW1SU+TjKwz01XNgMuPzSGemHbNEI5t9bc8pZ22TdtvFfj4JpuLCtSiCPGxvMy1fNWKz4588LgcTNPri6LNw+FXIkANH+G0TDlWtnGTbf6g3DjnkSlkQCEMnoG/qDMupcRz/iBBoI1fgDMkEw/wEnQ0yuvQPmj0a5y1wfm+FXE3w1H7wdS2OmqJ+fcsktMSyq8vZeFeMKTt4v1PamEaLidZ+VgjrX1G0l6HvVBZHRPwOmBJTYLn+vE= X-MS-TrafficTypeDiagnostic: AM7EUR06HT088: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z2TocDJd5pU0SC9ULFrPtAwKDy9srnPWigSauT7hbQf+qWEYuNGD1oDsXZwhP1kd4RGandBfrfvvwFWNX8RcMf2031Wulrk6QxBz9EHeZauAZtL1gZqVGpYmsUD7mBqvuXgpWpQ64y/V9TGTJqjQ7XDpNI/dSMCyGW/dnyCoTgKFG0DyBE2jLrGTnhjkHmlevZArQoEoLpbLAb++2cl5mgFXZyiSHdZSuQuKnCU/W6gV9hRasZREYJt9i4ipGpX3SDerENX4co0QOxCTLjrUuf21aNh/wj8BXFWbE/ROt06dQGEjY6vtS3ckTys4yNDkDsqgXMiS9C0k8q0KCPjGt+jhAE0nt8UTVy1R1IjvaYpXZDU7+B+l24BSESxeEoweaJdZgs4qs86XyZ9EJcei6g== X-MS-Exchange-AntiSpam-MessageData: X2iEVRalb+VZVlhV9C8eOsVVtgOIJOf6UkynwXMT+z4/K9c1N5O2/B3ei35QsaSd+i1AHgVnyIUli6dCWTeJ3msYsHOVpkiOtyDV2spDi2TfrgXTIhxGnY3r/raQxACoEjlLkITq7GMkNifKFrECfg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8ca4579-9da9-4f3a-be43-08d9004b7e82 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2021 20:17:29.6609 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT022.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT088 Subject: [FFmpeg-devel] [PATCH 05/10] fate/id3v2: Add test for id3v2 chapters 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 --- tests/fate/id3v2.mak | 5 +++ tests/ref/fate/id3v2-chapters | 66 +++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 tests/ref/fate/id3v2-chapters diff --git a/tests/fate/id3v2.mak b/tests/fate/id3v2.mak index 1bf95129bd..fea7545270 100644 --- a/tests/fate/id3v2.mak +++ b/tests/fate/id3v2.mak @@ -6,6 +6,11 @@ FATE_ID3V2_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL MP3_DEMUXER MP3_MUXER \ += fate-id3v2-priv-remux fate-id3v2-priv-remux: CMD = transcode mp3 $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp3 mp3 "-c copy" "-c copy -t 0.1" "" "-show_entries format_tags" +FATE_ID3V2_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL WAV_DEMUXER AIFF_MUXER \ + AIFF_DEMUXER FRAMECRC_MUXER PIPE_PROTOCOL) \ + += fate-id3v2-chapters +fate-id3v2-chapters: CMD = transcode wav $(TARGET_SAMPLES)/wav/200828-005.wav aiff "-c copy -metadata:c:0 description=foo -metadata:c:0 date=2021 -metadata:c copyright=none -metadata:c:1 genre=nonsense -write_id3v2 1" "-c copy -t 0.05" "" "-show_entries format_tags:chapters" + FATE_SAMPLES_FFPROBE += $(FATE_ID3V2_FFPROBE-yes) FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_ID3V2_FFMPEG_FFPROBE-yes) fate-id3v2: $(FATE_ID3V2_FFPROBE-yes) $(FATE_ID3V2_FFMPEG_FFPROBE-yes) diff --git a/tests/ref/fate/id3v2-chapters b/tests/ref/fate/id3v2-chapters new file mode 100644 index 0000000000..5aa8f82af9 --- /dev/null +++ b/tests/ref/fate/id3v2-chapters @@ -0,0 +1,66 @@ +4a68428e97f0af8d222a91404ae0839c *tests/data/fate/id3v2-chapters.aiff +2458466 tests/data/fate/id3v2-chapters.aiff +#tb 0: 1/48000 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 48000 +#channel_layout 0: 3 +#channel_layout_name 0: stereo +0, 0, 0, 1024, 4096, 0xc5b6547b +0, 1024, 1024, 1024, 4096, 0x0f27633e +0, 2048, 2048, 1024, 4096, 0x6c66e3dc +[CHAPTER] +id=0 +time_base=1/1000 +start=3104 +start_time=3.104000 +end=4720 +end_time=4.720000 +TAG:title=01 +TAG:description=foo +TAG:date=2021 +TAG:copyright=none +[/CHAPTER] +[CHAPTER] +id=1 +time_base=1/1000 +start=4720 +start_time=4.720000 +end=6286 +end_time=6.286000 +TAG:title=02 +TAG:genre=nonsense +[/CHAPTER] +[CHAPTER] +id=2 +time_base=1/1000 +start=6286 +start_time=6.286000 +end=6542 +end_time=6.542000 +TAG:title=03 +[/CHAPTER] +[CHAPTER] +id=3 +time_base=1/1000 +start=6542 +start_time=6.542000 +end=8261 +end_time=8.261000 +TAG:title=04 +[/CHAPTER] +[CHAPTER] +id=4 +time_base=1/1000 +start=8261 +start_time=8.261000 +end=12801 +end_time=12.801000 +TAG:title=05 +[/CHAPTER] +[FORMAT] +TAG:encoded_by=ZOOM Handy Recorder H4n +TAG:date=2020-08-28 +TAG:coding_history=A=PCM,F=48000,W=16,M=stereo,T=ZOOM Handy Recorder H4n +TAG:time_reference=2350992000 +[/FORMAT] From patchwork Thu Apr 15 20:16:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26939 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 7C07644ACE3 for ; Thu, 15 Apr 2021 23:17:41 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6494E68A67E; Thu, 15 Apr 2021 23:17:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-DB8-obe.outbound.protection.outlook.com (mail-db8eur06olkn2015.outbound.protection.outlook.com [40.92.51.15]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 06644689BB5 for ; Thu, 15 Apr 2021 23:17:39 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gk5/8ibrhy31yhXKVLHpcS+D1QNovvjQUPVG0lSNGxTzk86h1ybUqatyWNchtpXQFoIfwLahinXzBJ3ck2w9qXSh9RhVz00Je0fsXeTS+D4vrjVxUOrxzx3JkgqS6zVz23KMhMc0avLuwI9HngSeF35iHa24/bsWIC65nWZDlYS9huQR/3AiB7Oe1i1DBvOfS/naUKs9dmLySSo1jjEFVjQExRpwWcEz66Vqq3VRW2CYNFkOKXvXc18/15BJP+HUVabsHF4MYuA638hmwvha7kOGqKqcMcxMIRaLyJDverWl/vsXuUw8x9pIY5Ti4K0gRfbpRhJ6Jkf4kzGi+HMqrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tZGjfbCfkky73yZxJJsRfL29Y0ZNQztpQmTUGquaXYY=; b=Fw3ExVtabcLWo0aVhFBDN5P2TgdfzjrMf/PSZlAihAjnuJWr5jF6/K5Rbd09u62w7yOnA3zVRs+xu8SWiC7bIkCI/J8Qg7+AU7rIisVDuFDmCUc7tvXoTO/p7eGzlkkFMGBwjZXtRxQGOCxl+i+5/kxtRh+ahD8yAD81KI7inYKA2rqVcPtJ3Ts3003N99D6jYxVk69xzrKZvPXW2wbGZtEZcdMNOaQ2ZbQ5B6f8gMt7L02VvKGUTijYcoau9mbLo9oKN0ao6KmGzbUMyi5ujvJqKhrgnnTBK19CGUtUihxIy1wvE3r+mJL90y5fco4PWtWZPhXPva+hGDXfV9rKTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tZGjfbCfkky73yZxJJsRfL29Y0ZNQztpQmTUGquaXYY=; b=rcaHvTlmKwMJ9f/2ddx971nTGIfCiuIouon4jT4uIClc3VolY7Qje+9Ob+WPpbBtg42gvT28xdInME3n6WzbIGHR6zxeFw2twzfCPKWGbI3X7f9sgXumyVm38I4RjEXU+PDhYBLUS4ZzUHb0KP3kSB0L+b7yBd6aRDmbmiMxJk1QfDHT9cFNHS8XFZdd53kjWSoBKmBV+CLJV4KwzALgGS9UoaK/fKm7LCH3dYtWxwtT3v67P7ortusFWYn6omHL+qVIVcAtp0z0yngsasiQmK4SYTOjxLcLg/NJi/58Ita5mbyF/zfucsAz9dpxlsgCfXIqHvym7XlIR6+nS99s5g== Received: from AM7EUR06FT022.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::51) by AM7EUR06HT159.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::284) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 20:17:38 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::53) by AM7EUR06FT022.mail.protection.outlook.com (2a01:111:e400:fc36::388) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Thu, 15 Apr 2021 20:17:38 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:DF9408E8E1C5D7C61ECD9A498C1A48F423DFC5A25A1F51EC51BB6BB4C2248FF9; UpperCasedChecksum:9FC9F0BC44CB9247094090DF213B9295F571A4B451492D559A97B345A0B3EC50; SizeAsReceived:7586; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 20:17:38 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Apr 2021 22:16:55 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [Jj3JkBKTBBrBxSGfQDgLyOrpTTkjDU+j] X-ClientProxiedBy: AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210415201659.1810798-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18 via Frontend Transport; Thu, 15 Apr 2021 20:17:38 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8bad0d8d-d586-4bfd-151f-08d9004b83fe X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXFKoSKZyiLYcPwGDHzH9eVZJqiEGGeC1aKfS5pngAj13OSGVD41IHY7rE8QP9N9hGgjAZm0GZKbmm3uQT9lfC4jd+IOAZu25JWmnp0XdMYcf+rHPeSGim/GHU1y1EmzEUUyulxN6WKOeWVrd6clU1M/GouUpRz3t6aA5BVdvwfTRSvcPP6IC4lamnmHPuejxFW3Jkw417lUMgGzwr/LnNP1WxNarAc9S49eRODIw+bGZqKbvFaajGLyq8BQl/fkMRtggbsSp6/GVbbQuM57BYJMEzjSBY3HLIECu5VXBvnSiTNUZg39K1511pwXTyWRAu5VDpFrNwihRtjS5BpQorwID+DOLYMZJ0x0FoKOaTJoB6or4KsMs06PmKr2adaCyPd351DAzgYsqy07Wh+3kt/nCPBNcReLXqdSZxmM/5GdkNGI999gbwpXQNSfI1g+FD+mUQm0JwnAHjZpZM67dLZ/c2e0mOMzLeaKWY5LSG/pjlx9Fj4RTSrki6TkzHW6Z92fWHSHdLVBfpLIgolJbffVaFL7y2Jy+uJteyS8gxBCrv1aIpq0ErRgg0g3/Vh5B2J7GSU8Du5v7pRLUvPwZ/8O0NZ8jh94r8gCj58vvxdvNq3t/8gaE4tSJgmRBWvcfUtn7nJm9ahQmW9FQZSMo/GkDt+CtHZF15ggXvNnGGkk7XU1vbR+RHgMS/voHXkVwhwQ3wsBBFDmYUV9G5Y/OiJpw5sRpXF/V0= X-MS-TrafficTypeDiagnostic: AM7EUR06HT159: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jrF39rtcSaAjU78hxcEpgB0yYegYwUFzo0o0lLSrhLuV6vAY8XnpFwnepHqM6DDxflQKKZi8soDO+p+4Z+8HMcRaYe+aRvjq/gaMSdPaFeGnVxjgLzNXcLzmT8edI5ztV3KZhBBcJ70fcQIVwsJL6HJY5NzCbFKLZ2SgM8c6Iv2mE40W2pD46fberPm/+ieHQEhKDINwzxruQA3uQoWwQ27cSkQJmaZZGOgqThGjLSl1upD2Hu/R/hi5Au/U77ECoWy2dVMjlRBd2Gg1YPgIvVzwgCVE4VfzJhasv/PIZcqDQEJ2yEWtGHwj8EugftwKKjQDF5gP3D4+eru83oMK1NUPx82AY9PeNbweHGcVSThtjMP+aFHA1DWTk85MERxx X-MS-Exchange-AntiSpam-MessageData: Oo0sFq/ZawayYVPyEbhD+yjZKGnCnkJ4ZMqWonUOXSfKJ9VNhvKt3c6QCrHviV7GLOumUdRnGy8FboNllV9UvnhnUkwi/egaLttThVg+3sXf3OHzMwa4C4IqK4dOsWeUa2T8A+gNEIc5zP31Uv1JDw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bad0d8d-d586-4bfd-151f-08d9004b83fe X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2021 20:17:38.8818 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT022.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT159 Subject: [FFmpeg-devel] [PATCH 06/10] avformat/aiffenc: Remove always-false 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" write_header() already checks that there are only video tracks besides the one audio track. Signed-off-by: Andreas Rheinhardt --- libavformat/aiffenc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c index 06e475cddb..1ecdb52ee7 100644 --- a/libavformat/aiffenc.c +++ b/libavformat/aiffenc.c @@ -210,9 +210,6 @@ static int aiff_write_packet(AVFormatContext *s, AVPacket *pkt) if (pkt->stream_index == aiff->audio_stream_idx) avio_write(pb, pkt->data, pkt->size); else { - if (s->streams[pkt->stream_index]->codecpar->codec_type != AVMEDIA_TYPE_VIDEO) - return 0; - /* warn only once for each stream */ if (s->streams[pkt->stream_index]->nb_frames == 1) { av_log(s, AV_LOG_WARNING, "Got more than one picture in stream %d," From patchwork Thu Apr 15 20:16:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26940 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 5FE1544ACE3 for ; Thu, 15 Apr 2021 23:17:43 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3D10268A71D; Thu, 15 Apr 2021 23:17:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-VI1-obe.outbound.protection.outlook.com (mail-vi1eur06olkn2083.outbound.protection.outlook.com [40.92.17.83]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 704A368A40E for ; Thu, 15 Apr 2021 23:17:42 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZD72WUMObgSWa2EhSq/oLg3ZNWZet7UQSG/FDCJ/SyLaSPax95D9PMHQMQiHkQ2O1UFn6qogVhPYU6KobgCv+am0wHcGJ213/L4yr2wBr6mvJmC67teu9glHv2iT6rOWGFKH98KUOzbaBqVa2H/IUtGhRTavA/yUx0fFccjQi5LgvLrPaaQbDqW+GNJ1kRguvqTwHYWxrXWdezVRR7pvX3KrMEiypcDyvF/88cHltmbPbGe7Wpxo/3ejyVS99sXK3GaUwN+hLYxXqjOLSusQ/RyFwygkZDCZJC7aHXz0CNixczKHPy6WwbEgcmT3FOIl2o1Z7WZ0jVCO6l1f4VgK3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ov1cCh1u5Aa9+Zr7/rJGbwZqbteF0Cq9VtuOiLSzGKY=; b=i6A2qDbjzVlQddKekLG2hrsIHWC0oX/QelEFvMaHcDOSiV4ATwIonmW12yCOuaW3vUZrEr4tSHRCRhGPtxOROUiKg26cMRFTOzXMUOiu1H7ma9ybVvubdQPmRNsMe3+6xjMYDnDs8B8ZqrOkXxnHesa3PxXY/XYjzUzQipOq1vg8qDLrWpFLSDonP2xAcImzi562Exza34AjrkoNv+sZv7qpWhV1iS1hbzqMEIfhSK/YhiwU4yDJ980e4i6h0jaUtVoKbIQgswc04sLjvEoYCwZ8rTkLMGbzasVvXGnhlmoxkKtU8f7BvkkZMn0RnyEw10J0eSy/unedcf0BSHJ0cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ov1cCh1u5Aa9+Zr7/rJGbwZqbteF0Cq9VtuOiLSzGKY=; b=s5Llog8I0y3gbeYMsw32dwuiNJHLxD1OXTcFQTqxlcVSF+9eaMrQG7z4UipWArApcvByLBHjyCPhQt+EWKNqT8dC2WHzagR96UHbyDDWHIh5ZBPMjGBj/3E3HwwX8gfXZ4HQideOMPId2gC6O1kFmZIOK51kZXGvmKbRUt/yHcT0zRemKAygZ+/Sv5FxjH14EQsawnCflOqx251yZoDj6PgyFCJ+Pqa/96ldAReArkFcHQ6FVWSBEMZ9xhL+etSPRsM7AYGPruXXxlg6+Nps96zsVSF8v+zTPg6/fYvuPMCT0QBTAvl8WWudTgy2FwYIMWGgpkM5mOW1kcWuA4HBWA== Received: from AM7EUR06FT022.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::42) by AM7EUR06HT127.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 20:17:41 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::53) by AM7EUR06FT022.mail.protection.outlook.com (2a01:111:e400:fc36::388) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Thu, 15 Apr 2021 20:17:41 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:A087950BD0D0F1B2983BA9FEC1E79A0C654D4BB389CF8EA7C5758E7D25B00DA9; UpperCasedChecksum:EC87E98C0FCE03B4C4ED64D9DA2A09A58D8E31D4A87F328C73208AA3C87DA38C; SizeAsReceived:7609; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 20:17:41 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Apr 2021 22:16:56 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [PP1UpXWxBOlxs1niwMao0xMaRvAXFzMo] X-ClientProxiedBy: AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210415201659.1810798-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18 via Frontend Transport; Thu, 15 Apr 2021 20:17:41 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 25286fdf-7d4d-4ad7-f064-08d9004b8593 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiTvkErHHM9AELLsJR433rIZfKYOLVheBu3eOhz1Hj8aEGAxXolX1zcYnidJXX4HSJYloOYz05N5iGhLPQDsc6NJMWWGndnSNVoZM+0o1T2RUJc5k1bYRTQuZx27d0QRuY/Pa0NptDaD1Kv8TXspkTHDb87BReUpPqg2VqDTjGZvH+6jCi694ZPltMwog11SMK9Y4VJOYdhvxuvnwnSz6tHHWHzW9LvTGcXOTS9cMle71zgLFmH1qt6AjTlN+uiHpCJYIblCfuJDfkOLvrbbRiPkrSQG9t27mIeh8PpoXa0JKYAdB+UaOo5/dyJk1Lj0EiGM+2F2B5b5Vmv6Q40gLP1hydi8D/R8qewVDCyXM0ViYErQ4kIHZdgTMAMILzNLjeNKXcRSRtf/rEWanhHSv3rsd+NXhI2TeflihVdH2NYxBXTyZX3HCnA0dVxtj0Vg48QagAvLLvVzosR7mVoMVh9FD9KGOlMIlQHddwfEtLFyYo6lC1eTYPBtenDWXT76gkGK0Vb+P4Eq4znOTB6AgRpGDpOxXxsrNGjuWvoKr56V2GY82R3FTF/9X1nMItbM71zNBdAjbdDprVtEU5XI5XALUaPlqcqKt6Fqlrpekr0YFeHULWqYgMRTHLWzlYsB5FP5XvP1IJyjhthTpNnbi2rq2/yGiLZn659rI77Uz24K5QB9YiUs4/+LgOVADeH0eadeDvL+/pYSftqa4RvtLn1wEtJw2Kh/phJEFtITdWtqa8CtIyLH2NgWw9N8K67AtzQ= X-MS-TrafficTypeDiagnostic: AM7EUR06HT127: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qXtGNCNKgxDMN0C+9mFp0Kd0ID/PqFHUPgMxkb4hCfcVcrsALG02tdCUszGxC3vdKDT5ChZ1Qe4yYQD0OiQNs1ZU/B1WniwHMtiyhVLeSiF0ePFmDcF6irKdCYbqd1GjlQFDUuMmiBcQ+KYuyb1i9OUAdjZY+Fl2XmFB8VRjHUZmUcjn1jnLqWOKlBsEPypg1JbKplm+1pVDolcVJLmz9hHbuwgT9TE/wS+xdZIQ1/baLT48T5hLX4YopHN9xv8AyJVTOLTiIileY4khHRGQE6s2UynR6ozFZUyOaTK6FxNT9z8/VP+I0RFhjznVLQf4rvSex41rel18xlCyTddFOO3FdKxx6f3BSI5j2vgW2en302ZOw8TmbHG9K4Z/XI+CIW3U1JjnyxknB7O+hchQHQ== X-MS-Exchange-AntiSpam-MessageData: Xvu/Nw0M4sjMkJqXjKWNYx1pQrtO6RBbrOf5jofSVBboBc5GJDgi60fA7VJkmiFSF99CbqZNjPcqB2e8YJIVLD0g/mibbr8JrKP22XL/FYgDcMoZOiKY1U8i7FZlzBVdnATytW5PwHX7M27l+U7nSQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 25286fdf-7d4d-4ad7-f064-08d9004b8593 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2021 20:17:41.5077 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT022.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT127 Subject: [FFmpeg-devel] [PATCH 07/10] avformat/aiffenc: Avoid seek when writing id3v2 tags at the end 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 --- libavformat/aiffenc.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c index 1ecdb52ee7..725e06b3bd 100644 --- a/libavformat/aiffenc.c +++ b/libavformat/aiffenc.c @@ -233,25 +233,12 @@ static int aiff_write_trailer(AVFormatContext *s) AVCodecParameters *par = s->streams[aiff->audio_stream_idx]->codecpar; /* Chunks sizes must be even */ - int64_t file_size, end_size; - end_size = file_size = avio_tell(pb); - if (file_size & 1) { + int64_t file_size, data_size; + data_size = avio_tell(pb); + if (data_size & 1) avio_w8(pb, 0); - end_size++; - } if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) { - /* Number of sample frames */ - avio_seek(pb, aiff->frames, SEEK_SET); - avio_wb32(pb, (file_size - aiff->ssnd - 12) / par->block_align); - - /* Sound Data chunk size */ - avio_seek(pb, aiff->ssnd, SEEK_SET); - avio_wb32(pb, file_size - aiff->ssnd - 4); - - /* return to the end */ - avio_seek(pb, end_size, SEEK_SET); - /* Write ID3 tags */ if (aiff->write_id3v2) if ((ret = put_id3v2_tags(s, aiff)) < 0) @@ -261,6 +248,14 @@ static int aiff_write_trailer(AVFormatContext *s) file_size = avio_tell(pb); avio_seek(pb, aiff->form, SEEK_SET); avio_wb32(pb, file_size - aiff->form - 4); + + /* Number of sample frames */ + avio_seek(pb, aiff->frames, SEEK_SET); + avio_wb32(pb, (data_size - aiff->ssnd - 12) / par->block_align); + + /* Sound Data chunk size */ + avio_seek(pb, aiff->ssnd, SEEK_SET); + avio_wb32(pb, data_size - aiff->ssnd - 4); } return ret; From patchwork Thu Apr 15 20:16:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26941 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 8AAFE44ACE3 for ; Thu, 15 Apr 2021 23:17:45 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7387068A70F; Thu, 15 Apr 2021 23:17:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-DB8-obe.outbound.protection.outlook.com (mail-db8eur06olkn2025.outbound.protection.outlook.com [40.92.51.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7F82568A72C for ; Thu, 15 Apr 2021 23:17:43 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YYOb3ywNwIBACzo1zp3RhIFffAEZ52MkZpL2j6EfciIoHmVW71pwhwvG4kAty9SxIVp5I553GzJwpPFxJLZ7NYlQsrW5TvkeyQY6NfwIJi6LGT084aJeHIavDQSnt2b5HicMTK3RF1aDtiDYADsWV+NS4a+Pd9FMFryD6m2ZFG2wgP8qvlyWqIMXWgymrGiLYNeWdNEKimYeuIWADfBHpqnu8EhUtOSfTooJNGj8ROS6qkqxGHkg/ebArJBooF/8Q21CBotksKjwSDdf5Ei15sJqmlSDmT+bOFovMwh7shTbfGEhIb7onSaRFpPOCDlJfqhnjcwXf4cfQlHwLmCWHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6cbUNgREp2NR/RuabRnEHHyxgKIDSBxs4eSNDnqLDic=; b=CXerqmO7pmxV09xe4stZUZF8DXpjsVjRdyTsXN26a68d2tDlfCQJGhE5/tXtI5VdlE7Ao4Ubg8ECriUirlWFf5lbx1a9Qs/b65/WRTcUs8rZC/rZRLu+BO7CsXLW8kUxcoC5Ic05YkF1Wie5MDkxWjJO4VuaaLr+BMkCZVlWMAeSnGoLShpYYu2x2Bm5NMp+Un60v9qHeBEAh+6SzQodygvFOj0G9ncq+b7FD1S5DrOmolIZNXihv5U/0oQj9WSINsnE5WTdG/aclrN4pUhhpBGPhzh6pxAa5AAov1czXXU/dCxkru4YypMSu1y5D8GhUDx/8cfsayZCg1ulb3umPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6cbUNgREp2NR/RuabRnEHHyxgKIDSBxs4eSNDnqLDic=; b=ddqfU5rPQ6ePQNZB1qou29jDwXgXIf5bw7kAEp143JiNu+eqxKuwQihDcVwrzgzVc1CAZbuXmSu/1lXIBYWjt9rJ5lUYXX+i64BVFGxMFawnIChHSy/oo3NTYxrJB1JND3vouL0PXPhlIacwXpry/2RpLYMAUbGIzbdAc1S8gct+nnk81hjGPkOw9Xq4Q0kq/QYf/lp1ngntTrIF+e68bzx7LhwD4UHsa4pt/w2RxsMl/t5OuAibXN62xwrq1nAvIdcYUOYFdbe2ycXzOgUNS9KpFqQBc0ioaAGvoCiuiMbeker+mtD+T4VaqvRwk3vrCHGyd7+FCoc7PG/UJszcIA== Received: from AM7EUR06FT022.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::49) by AM7EUR06HT262.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::320) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 20:17:42 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::53) by AM7EUR06FT022.mail.protection.outlook.com (2a01:111:e400:fc36::388) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Thu, 15 Apr 2021 20:17:42 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:26D667D975D497E8E623735DFA025D5DF556C43863AC67797008AFE115A60404; UpperCasedChecksum:4D79D6C5ADC57AA36F499172144E8A79D3B1B17B5B28F86B527242953BF57B22; SizeAsReceived:8748; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 20:17:42 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Apr 2021 22:16:57 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [Nv8dwjf8NR835CUBPDknjrinHhmmbXby] X-ClientProxiedBy: AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210415201659.1810798-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18 via Frontend Transport; Thu, 15 Apr 2021 20:17:41 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 6f8a6d5e-68f9-4bb0-5dce-08d9004b85f0 X-MS-Exchange-SLBlob-MailProps: =?utf-8?q?VCKv1Cle4b2ZzuLSQFyzEP/moa9ae+muqn?= =?utf-8?q?VvX8cJm9+Yq382FYgeflMKVCrVS+/vObKDyG80OruxNc2TbYbr6eVxMKjVboYmduB?= =?utf-8?q?3Vup/a3y5LBuiDbacA5wSBUKzJyRFy8mqAUNa4uv7UquH6smjuqiWQKJPJMmzck2I?= =?utf-8?q?nxpIKSuK9hjWC7NgkVp8oGsn5B9Ml8FHSTHpqoa6TaKH2qhvt0Lhh/w8g8IwdidKN?= =?utf-8?q?6jfdAcFq1M2X/9I0d5hORIqUgWR6D2re3DRTpycySEnjZTm/2k1GNdMEbR2HxOZU+?= =?utf-8?q?yXye8LjzyB/IC8n44H9xfPJvNoBza4LbmuV1cYprEDBrG0ky1nvmeOcv4lcZzGgRl?= =?utf-8?q?PB2+aJWVbNpRzdzsYhwb6TjK2gAzuJl/hGcjHKLyu+gWP0Q7+9ANa0UTL4xx0L+MF?= =?utf-8?q?Ynr+5CxbpdyoQaIvpBejLonXFkZYvFGdgbUF+AIz1XmV7KxBPD/vJCYub+Pk2L7eo?= =?utf-8?q?IividMlctmj10BNIZHaG8aUzkUKVQmdW8eA9MfkaRrPKJA0k23h5I38WXyhNLysIJ?= =?utf-8?q?Ppv9IhNwkajpKXX80lmwI6gfdJsIp/vb9qOx+U0zWilJ/X3QUshGv7TEoSAlksgQ0?= =?utf-8?q?6HnY5rm49ZTRstdZCzO6eT6l0JeWNYvWG11WEE7RWKoneleQwxJAeEhpdad7R9odL?= =?utf-8?q?Ye99iRWqpE3/Af6i8YuFRWYjpqTqwNallvT9FBFy6idqJOXxrDDS5rhlLOY4nwGOX?= =?utf-8?q?HsFEltj7Xyu10GuqqVUz7+CHYoEpdDuQMHh95KvW5TcuSOIpYEULMzGzET58674Xn?= =?utf-8?q?gjpW3NepEn6yeCZuvE8nbYbFvEJHZvmd6XJTfJgI/BN0wbybx9i1EDGzzPtq8+J0G?= =?utf-8?q?pxAT0FS1B0GK4LhGqpoFK0cCV6eKGhNxaZ+00ff89cDhkRV/zkMbFJGp1SjuRMbSE?= =?utf-8?q?y50XgQNOcjWMyc+5ITrm3au4WAoy1UbCk6PTR3Py/z1VEfzsp81I/TcLBfQwa3b34?= =?utf-8?q?KgCoyeb9IGS83nr9o5YpuTJyJ6bpWWHyNdXHCQSyHIyy0W7fKLiRjHJdH0=3D?= X-MS-TrafficTypeDiagnostic: AM7EUR06HT262: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Zb4YsvPjwKYbgjsdxUgZb/8usxKFgT6DmistDAJ5us5Tt7b/qwR4PbLdpksUcNeTniQ0Yq8Aoi8rKy6raDKtAdqgnOK3Lw0WgGgAOXJHxcTv6PbE+x4WoGLha5WGGGuuboAFPlnHHX60kROsZA4XCRF6YlI9PkTES2fvcoyGJWJrpNjQkkwm/DqNG9MaMDhqrBZQZxfpdF1opjfmaRbw7MiKRrOk0RBLKBhxIbHUxluPK9ep6nCrsPujx5KTGd/Ek5tHjpJxmmOkPsUPg/2LmGN/MlPtLQ+0ynSoxfMfn12NS5xcFGAjRsM9WWZtdzcZ5hyAjCijU7egvGpQab5nXC/BRa8so0Gq9khv/F2BpojioBPEx6XRlYRAsPVn6FA/vZt06JKyg1JsgbdX8ZRSGQ== X-MS-Exchange-AntiSpam-MessageData: umhkbftzQDitkABvx0zut0jO0wyLmVPpBjwZAzCIZLYQwXkP9jex2/7s76nmoK+z46CI2fh31AK35T66GAqsNTy7XB4nCxjg+H50kHWoB2K03+3h6uZbHuBCffXwWegAHsJrgih9abIwdsOMaaIXTA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f8a6d5e-68f9-4bb0-5dce-08d9004b85f0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2021 20:17:42.1614 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT022.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT262 Subject: [FFmpeg-devel] [PATCH 08/10] avformat/id3v2: Don't reverse the order of id3v2 APICs 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" When parsing ID3v2 tags, special (non-text) metadata is not applied directly and unconditionally; instead it is stored in a linked list in which elements are prepended. When traversing the list to add APICs (or private tags) at the end, the order is reversed. The same also happens for chapters and therefore the chapter parsing code already reverses the chapters. This commit changes this: By keeping pointers to both head and tail of the linked list one can preserve the order of the entries and remove the reordering code for chapters. Only the pointer to head will be exported: No current caller uses a nonempty list, so exporting both head and tail is unnecessary. This removes the functionality to combine the lists of special metadata read from different ID3v2 tags, but that doesn't make really much sense anyway (and would be trivial to implement if desired) and allows to remove the now unnecessary initializations performed by the callers. The FATE-reference for the id3v2-priv test had to be updated because the order of the tags read into the dict is reversed; for id3v2-priv-remux only the md5 and not the ffprobe output of the remuxed file changes because the order of the private tags has up until now been reversed twice. The references for the aiff/mp3 cover-art tests needed to be updated, because the order of the attached pics is reversed upon reading. It is still not correct, because the muxers write the pics in the order in which they arrive at the muxer instead of the order given by pkt->stream_index. Signed-off-by: Andreas Rheinhardt --- libavformat/aacdec.c | 2 +- libavformat/aiffdec.c | 2 +- libavformat/asf.c | 2 +- libavformat/dsfdec.c | 2 +- libavformat/id3v2.c | 95 ++++++++++------------- libavformat/id3v2.h | 4 +- libavformat/iff.c | 1 - libavformat/omadec.c | 2 +- libavformat/wavdec.c | 2 +- tests/ref/fate/cover-art-aiff-id3v2-remux | 44 +++++------ tests/ref/fate/cover-art-mp3-id3v2-remux | 16 ++-- tests/ref/fate/id3v2-priv | 2 +- tests/ref/fate/id3v2-priv-remux | 2 +- 13 files changed, 82 insertions(+), 94 deletions(-) diff --git a/libavformat/aacdec.c b/libavformat/aacdec.c index a0aa112a8a..ea3203df36 100644 --- a/libavformat/aacdec.c +++ b/libavformat/aacdec.c @@ -136,7 +136,7 @@ static int handle_id3(AVFormatContext *s, AVPacket *pkt) { AVDictionary *metadata = NULL; AVIOContext ioctx; - ID3v2ExtraMeta *id3v2_extra_meta = NULL; + ID3v2ExtraMeta *id3v2_extra_meta; int ret; ret = av_append_packet(s->pb, pkt, ff_id3v2_tag_len(pkt->data) - pkt->size); diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index dcaf1560b6..1b693b71a3 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -212,7 +212,7 @@ static int aiff_read_header(AVFormatContext *s) AVIOContext *pb = s->pb; AVStream * st; AIFFInputContext *aiff = s->priv_data; - ID3v2ExtraMeta *id3v2_extra_meta = NULL; + ID3v2ExtraMeta *id3v2_extra_meta; /* check FORM header */ filesize = get_tag(pb, &tag); diff --git a/libavformat/asf.c b/libavformat/asf.c index cef0f9f646..1ac8b5f078 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -255,7 +255,7 @@ fail: static int get_id3_tag(AVFormatContext *s, int len) { - ID3v2ExtraMeta *id3v2_extra_meta = NULL; + ID3v2ExtraMeta *id3v2_extra_meta; ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta, len); if (id3v2_extra_meta) { diff --git a/libavformat/dsfdec.c b/libavformat/dsfdec.c index 1df163e114..2fca25ef32 100644 --- a/libavformat/dsfdec.c +++ b/libavformat/dsfdec.c @@ -50,7 +50,7 @@ static const uint64_t dsf_channel_layout[] = { static void read_id3(AVFormatContext *s, uint64_t id3pos) { - ID3v2ExtraMeta *id3v2_extra_meta = NULL; + ID3v2ExtraMeta *id3v2_extra_meta; if (avio_seek(s->pb, id3pos, SEEK_SET) < 0) return; diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 863709abbf..e0fef08789 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -443,12 +443,24 @@ static void read_comment(AVFormatContext *s, AVIOContext *pb, int taglen, av_dict_set(metadata, key, (const char *) dst, dict_flags); } +typedef struct ExtraMetaList { + ID3v2ExtraMeta *head, *tail; +} ExtraMetaList; + +static void list_append(ID3v2ExtraMeta *new_elem, ExtraMetaList *list) +{ + if (list->tail) + list->tail->next = new_elem; + else + list->head = new_elem; + list->tail = new_elem; +} + /** * Parse GEOB tag into a ID3v2ExtraMetaGEOB struct. */ static void read_geobtag(AVFormatContext *s, AVIOContext *pb, int taglen, - const char *tag, ID3v2ExtraMeta **extra_meta, - int isv34) + const char *tag, ExtraMetaList *extra_meta, int isv34) { ID3v2ExtraMetaGEOB *geob_data = NULL; ID3v2ExtraMeta *new_extra = NULL; @@ -505,8 +517,7 @@ static void read_geobtag(AVFormatContext *s, AVIOContext *pb, int taglen, /* add data to the list */ new_extra->tag = "GEOB"; - new_extra->next = *extra_meta; - *extra_meta = new_extra; + list_append(new_extra, extra_meta); return; @@ -580,8 +591,7 @@ static void rstrip_spaces(char *buf) } static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen, - const char *tag, ID3v2ExtraMeta **extra_meta, - int isv34) + const char *tag, ExtraMetaList *extra_meta, int isv34) { int enc, pic_type; char mimetype[64] = {0}; @@ -654,12 +664,11 @@ static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen, memset(apic->buf->data + taglen, 0, AV_INPUT_BUFFER_PADDING_SIZE); new_extra->tag = "APIC"; - new_extra->next = *extra_meta; - *extra_meta = new_extra; // The description must be unique, and some ID3v2 tag writers add spaces // to write several APIC entries with the same description. rstrip_spaces(apic->description); + list_append(new_extra, extra_meta); return; @@ -677,7 +686,8 @@ static void free_chapter(void *obj) av_dict_free(&chap->meta); } -static void read_chapter(AVFormatContext *s, AVIOContext *pb, int len, const char *ttag, ID3v2ExtraMeta **extra_meta, int isv34) +static void read_chapter(AVFormatContext *s, AVIOContext *pb, int len, + const char *ttag, ExtraMetaList *extra_meta, int isv34) { int taglen; char tag[5]; @@ -721,8 +731,7 @@ static void read_chapter(AVFormatContext *s, AVIOContext *pb, int len, const cha ff_metadata_conv(&chap->meta, NULL, ff_id3v2_4_metadata_conv); new_extra->tag = "CHAP"; - new_extra->next = *extra_meta; - *extra_meta = new_extra; + list_append(new_extra, extra_meta); return; @@ -739,7 +748,7 @@ static void free_priv(void *obj) } static void read_priv(AVFormatContext *s, AVIOContext *pb, int taglen, - const char *tag, ID3v2ExtraMeta **extra_meta, int isv34) + const char *tag, ExtraMetaList *extra_meta, int isv34) { ID3v2ExtraMeta *meta; ID3v2ExtraMetaPRIV *priv; @@ -763,8 +772,7 @@ static void read_priv(AVFormatContext *s, AVIOContext *pb, int taglen, goto fail; meta->tag = "PRIV"; - meta->next = *extra_meta; - *extra_meta = meta; + list_append(meta, extra_meta); return; @@ -777,7 +785,7 @@ typedef struct ID3v2EMFunc { const char *tag3; const char *tag4; void (*read)(AVFormatContext *s, AVIOContext *pb, int taglen, - const char *tag, ID3v2ExtraMeta **extra_meta, + const char *tag, ExtraMetaList *extra_meta, int isv34); void (*free)(void *obj); } ID3v2EMFunc; @@ -811,7 +819,7 @@ static const ID3v2EMFunc *get_extra_meta_func(const char *tag, int isv34) static void id3v2_parse(AVIOContext *pb, AVDictionary **metadata, AVFormatContext *s, int len, uint8_t version, - uint8_t flags, ID3v2ExtraMeta **extra_meta) + uint8_t flags, ExtraMetaList *extra_meta) { int isv34, unsync; unsigned tlen; @@ -1063,13 +1071,17 @@ error: static void id3v2_read_internal(AVIOContext *pb, AVDictionary **metadata, AVFormatContext *s, const char *magic, - ID3v2ExtraMeta **extra_meta, int64_t max_search_size) + ID3v2ExtraMeta **extra_metap, int64_t max_search_size) { int len, ret; uint8_t buf[ID3v2_HEADER_SIZE]; + ExtraMetaList extra_meta = { NULL }; int found_header; int64_t start, off; + if (extra_metap) + *extra_metap = NULL; + if (max_search_size && max_search_size < ID3v2_HEADER_SIZE) return; @@ -1096,7 +1108,8 @@ static void id3v2_read_internal(AVIOContext *pb, AVDictionary **metadata, ((buf[7] & 0x7f) << 14) | ((buf[8] & 0x7f) << 7) | (buf[9] & 0x7f); - id3v2_parse(pb, metadata, s, len, buf[3], buf[5], extra_meta); + id3v2_parse(pb, metadata, s, len, buf[3], buf[5], + extra_metap ? &extra_meta : NULL); } else { avio_seek(pb, off, SEEK_SET); } @@ -1105,6 +1118,8 @@ static void id3v2_read_internal(AVIOContext *pb, AVDictionary **metadata, ff_metadata_conv(metadata, NULL, id3v2_2_metadata_conv); ff_metadata_conv(metadata, NULL, ff_id3v2_4_metadata_conv); merge_date(metadata); + if (extra_metap) + *extra_metap = extra_meta.head; } void ff_id3v2_read_dict(AVIOContext *pb, AVDictionary **metadata, @@ -1166,55 +1181,29 @@ int ff_id3v2_parse_apic(AVFormatContext *s, ID3v2ExtraMeta *extra_meta) return 0; } -int ff_id3v2_parse_chapters(AVFormatContext *s, ID3v2ExtraMeta *extra_meta) +int ff_id3v2_parse_chapters(AVFormatContext *s, ID3v2ExtraMeta *cur) { - int ret = 0; - ID3v2ExtraMeta *cur; AVRational time_base = {1, 1000}; - ID3v2ExtraMetaCHAP **chapters = NULL; - int num_chapters = 0; - int i; + int ret; - // since extra_meta is a linked list where elements are prepended, - // we need to reverse the order of chapters - for (cur = extra_meta; cur; cur = cur->next) { + for (unsigned i = 0; cur; cur = cur->next) { ID3v2ExtraMetaCHAP *chap; + AVChapter *chapter; if (strcmp(cur->tag, "CHAP")) continue; - chap = &cur->data.chap; - - if ((ret = av_dynarray_add_nofree(&chapters, &num_chapters, chap)) < 0) - goto end; - } - - for (i = 0; i < (num_chapters / 2); i++) { - ID3v2ExtraMetaCHAP *right; - int right_index; - - right_index = (num_chapters - 1) - i; - right = chapters[right_index]; - chapters[right_index] = chapters[i]; - chapters[i] = right; - } - - for (i = 0; i < num_chapters; i++) { - ID3v2ExtraMetaCHAP *chap; - AVChapter *chapter; - - chap = chapters[i]; - chapter = avpriv_new_chapter(s, i, time_base, chap->start, chap->end, chap->element_id); + chap = &cur->data.chap; + chapter = avpriv_new_chapter(s, i++, time_base, chap->start, + chap->end, chap->element_id); if (!chapter) continue; if ((ret = av_dict_copy(&chapter->metadata, chap->meta, 0)) < 0) - goto end; + return ret; } -end: - av_freep(&chapters); - return ret; + return 0; } int ff_id3v2_parse_priv_dict(AVDictionary **metadata, ID3v2ExtraMeta *extra_meta) diff --git a/libavformat/id3v2.h b/libavformat/id3v2.h index a41fb271a4..9afa5a2ddc 100644 --- a/libavformat/id3v2.h +++ b/libavformat/id3v2.h @@ -111,7 +111,7 @@ int ff_id3v2_tag_len(const uint8_t *buf); * Read an ID3v2 tag into specified dictionary and retrieve supported extra metadata. * * @param metadata Parsed metadata is stored here - * @param extra_meta If not NULL, extra metadata is parsed into a list of + * @param[out] extra_meta If not NULL, extra metadata is parsed into a list of * ID3v2ExtraMeta structs and *extra_meta points to the head of the list */ void ff_id3v2_read_dict(AVIOContext *pb, AVDictionary **metadata, const char *magic, ID3v2ExtraMeta **extra_meta); @@ -121,7 +121,7 @@ void ff_id3v2_read_dict(AVIOContext *pb, AVDictionary **metadata, const char *ma * * Data is read from and stored to AVFormatContext. * - * @param extra_meta If not NULL, extra metadata is parsed into a list of + * @param[out] extra_meta If not NULL, extra metadata is parsed into a list of * ID3v2ExtraMeta structs and *extra_meta points to the head of the list * @param[opt] max_search_search restrict ID3 magic number search (bytes from start) */ diff --git a/libavformat/iff.c b/libavformat/iff.c index b07b6c8b18..27b5581cc3 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -315,7 +315,6 @@ static int parse_dsd_prop(AVFormatContext *s, AVStream *st, uint64_t eof) break; case MKTAG('I','D','3',' '): - id3v2_extra_meta = NULL; ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta, size); if (id3v2_extra_meta) { if ((ret = ff_id3v2_parse_apic(s, id3v2_extra_meta)) < 0 || diff --git a/libavformat/omadec.c b/libavformat/omadec.c index d31b475fd2..74b32db96d 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -413,7 +413,7 @@ static int oma_read_header(AVFormatContext *s) uint8_t buf[EA3_HEADER_SIZE]; uint8_t *edata; AVStream *st; - ID3v2ExtraMeta *extra_meta = NULL; + ID3v2ExtraMeta *extra_meta; OMAContext *oc = s->priv_data; ff_id3v2_read(s, ID3v2_EA3_MAGIC, &extra_meta, 0); diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 8214ab8498..aca9a8382b 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@ -549,7 +549,7 @@ static int wav_read_header(AVFormatContext *s) break; case MKTAG('I', 'D', '3', ' '): case MKTAG('i', 'd', '3', ' '): { - ID3v2ExtraMeta *id3v2_extra_meta = NULL; + ID3v2ExtraMeta *id3v2_extra_meta; ff_id3v2_read_dict(pb, &s->internal->id3v2_meta, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta); if (id3v2_extra_meta) { ff_id3v2_parse_apic(s, id3v2_extra_meta); diff --git a/tests/ref/fate/cover-art-aiff-id3v2-remux b/tests/ref/fate/cover-art-aiff-id3v2-remux index 207721fc71..c294c5013e 100644 --- a/tests/ref/fate/cover-art-aiff-id3v2-remux +++ b/tests/ref/fate/cover-art-aiff-id3v2-remux @@ -8,29 +8,29 @@ d4a9481090a8bab1a3f072a8108a1d6a *tests/data/fate/cover-art-aiff-id3v2-remux.aif #channel_layout_name 0: stereo #tb 1: 1/90000 #media_type 1: video -#codec_id 1: bmp +#codec_id 1: mjpeg #dimensions 1: 350x350 -#sar 1: 0/1 +#sar 1: 1/1 #tb 2: 1/90000 #media_type 2: video -#codec_id 2: png +#codec_id 2: mjpeg #dimensions 2: 350x350 #sar 2: 1/1 #tb 3: 1/90000 #media_type 3: video -#codec_id 3: mjpeg +#codec_id 3: png #dimensions 3: 350x350 #sar 3: 1/1 #tb 4: 1/90000 #media_type 4: video -#codec_id 4: mjpeg +#codec_id 4: bmp #dimensions 4: 350x350 -#sar 4: 1/1 +#sar 4: 0/1 0, 0, 0, 1024, 4096, 0xdac4695d -1, 0, 0, 0, 368254, 0xfa7f4bd8 -2, 0, 0, 0, 184497, 0xc33f8d44 -3, 0, 0, 0, 19650, 0xd5662610 -4, 0, 0, 0, 19650, 0xd5662610 +1, 0, 0, 0, 19650, 0xd5662610 +2, 0, 0, 0, 19650, 0xd5662610 +3, 0, 0, 0, 184497, 0xc33f8d44 +4, 0, 0, 0, 368254, 0xfa7f4bd8 0, 1024, 1024, 1024, 4096, 0xad05c909 0, 2048, 2048, 1024, 4096, 0x97e3b8f8 0, 3072, 3072, 1024, 4096, 0xb08180fa @@ -41,31 +41,31 @@ DISPOSITION:attached_pic=0 [/STREAM] [STREAM] index=1 -codec_name=bmp +codec_name=mjpeg DISPOSITION:attached_pic=1 -TAG:title=third -TAG:comment=Conductor +TAG:title=first +TAG:comment=Other [/STREAM] [STREAM] index=2 -codec_name=png +codec_name=mjpeg DISPOSITION:attached_pic=1 -TAG:title=second -TAG:comment=Illustration +TAG:title=fourth +TAG:comment=Composer [/STREAM] [STREAM] index=3 -codec_name=mjpeg +codec_name=png DISPOSITION:attached_pic=1 -TAG:title=fourth -TAG:comment=Composer +TAG:title=second +TAG:comment=Illustration [/STREAM] [STREAM] index=4 -codec_name=mjpeg +codec_name=bmp DISPOSITION:attached_pic=1 -TAG:title=first -TAG:comment=Other +TAG:title=third +TAG:comment=Conductor [/STREAM] [FORMAT] TAG:artist=Мельница diff --git a/tests/ref/fate/cover-art-mp3-id3v2-remux b/tests/ref/fate/cover-art-mp3-id3v2-remux index a3bc8c7891..713ca9e951 100644 --- a/tests/ref/fate/cover-art-mp3-id3v2-remux +++ b/tests/ref/fate/cover-art-mp3-id3v2-remux @@ -8,9 +8,9 @@ c1b55a9a92226cd72d3f53ccd830d127 *tests/data/fate/cover-art-mp3-id3v2-remux.mp3 #channel_layout_name 0: stereo #tb 1: 1/90000 #media_type 1: video -#codec_id 1: png +#codec_id 1: mjpeg #dimensions 1: 263x263 -#sar 1: 1/1 +#sar 1: 96/96 #tb 2: 1/90000 #media_type 2: video #codec_id 2: bmp @@ -18,13 +18,13 @@ c1b55a9a92226cd72d3f53ccd830d127 *tests/data/fate/cover-art-mp3-id3v2-remux.mp3 #sar 2: 0/1 #tb 3: 1/90000 #media_type 3: video -#codec_id 3: mjpeg +#codec_id 3: png #dimensions 3: 263x263 -#sar 3: 96/96 +#sar 3: 1/1 0, -353590, -353590, 368640, 417, 0x15848290, S=1, 10, 0x034e0055 -1, 0, 0, 0, 165671, 0x7c1c8070 +1, 0, 0, 0, 15760, 0x71d5c418 2, 0, 0, 0, 208350, 0x291b44d1 -3, 0, 0, 0, 15760, 0x71d5c418 +3, 0, 0, 0, 165671, 0x7c1c8070 0, 15050, 15050, 368640, 418, 0x46f684a4 0, 383690, 383690, 368640, 418, 0x46f684a4 0, 752330, 752330, 368640, 418, 0x46f684a4 @@ -37,7 +37,7 @@ TAG:encoder=Lavf [/STREAM] [STREAM] index=1 -codec_name=png +codec_name=mjpeg DISPOSITION:attached_pic=1 TAG:comment=Other [/STREAM] @@ -49,7 +49,7 @@ TAG:comment=Band/Orchestra [/STREAM] [STREAM] index=3 -codec_name=mjpeg +codec_name=png DISPOSITION:attached_pic=1 TAG:comment=Other [/STREAM] diff --git a/tests/ref/fate/id3v2-priv b/tests/ref/fate/id3v2-priv index 965c8695e8..8448495325 100644 --- a/tests/ref/fate/id3v2-priv +++ b/tests/ref/fate/id3v2-priv @@ -1,5 +1,5 @@ [FORMAT] TAG:title=id3v2-test -TAG:id3v2_priv.testowner=testdata TAG:id3v2_priv.testowner2=\x00\x01\x02 +TAG:id3v2_priv.testowner=testdata [/FORMAT] diff --git a/tests/ref/fate/id3v2-priv-remux b/tests/ref/fate/id3v2-priv-remux index 0fdd5d9d0a..6a8b58f27e 100644 --- a/tests/ref/fate/id3v2-priv-remux +++ b/tests/ref/fate/id3v2-priv-remux @@ -1,4 +1,4 @@ -3e99254aa892a9578ce31da17b012a44 *tests/data/fate/id3v2-priv-remux.mp3 +bb2816e3a05ce136e9ac14479c1ebe24 *tests/data/fate/id3v2-priv-remux.mp3 8542 tests/data/fate/id3v2-priv-remux.mp3 #tb 0: 1/14112000 #media_type 0: audio From patchwork Thu Apr 15 20:16:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26942 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 BBDEB44ACE3 for ; Thu, 15 Apr 2021 23:17:46 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A225668A7E0; Thu, 15 Apr 2021 23:17:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-DB8-obe.outbound.protection.outlook.com (mail-db8eur06olkn2031.outbound.protection.outlook.com [40.92.51.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C610D68A773 for ; Thu, 15 Apr 2021 23:17:43 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rs+v41/QZJF3HN7OAYskwJPg8/R92DKuFXmH3o5RA2JuTgVnh2HNBGoEMRV/8vnxZoYmTIBDW8j+lH3wUYkIhjyUcnWKHUtNl4XjEmFBx0F/OdlO1i3L7Wt8eDv9DObG/utsnbIDGAvsMXEfokATXKsElwfbb6mAx/We1T+R2Ivy4BqbJqEeqDlJDUs0818qO+ZNvWwnVIxAf5/Fj2Yf2uDxpBBPqalsMIdHBsz5Ubs0TIUQE0xhJNbZyPV19ERRU+gGm9ovWAF+f4ZsS19B8olB5svt4rSDqSszsGZOq9SBFYnnUJm2hr91yazLKMDsA5MO+RsL8ucEtFQzPfJx0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oKvRcc+6sBl/q9ha2UnpmPXjlXN9zj631eyLwi0IhTk=; b=Weyk37uhJ+2uWm5f9w4KQDGjvl+cf9rjF9ENJNeDqiMW9pJMZUIQJ42WJfkGaYGHHiCgZyknR6hWF7oRntaMvgISXT9mrb48qboX4AOlGdPPYB49BvJWALdDycwYKdDEji38NkEliINpHKRfRwWQl8RpAY2nlwhlIlOjN08qrovqBn1Bt9g/wFBKRjAM+SnPbH4pPOJIR7SPgdId35oksoMQQnzjjGmSLsAbppfyK37tBwzD9Jj1CrRf3/mM/dOAm4Z52ovx37rgP63XFlL/uxk7Hq54iXqo0+4/T+NqLhh87uvvfD13cNzphnf0GVCQ5pjp0aQItcFh2X6UoChguw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oKvRcc+6sBl/q9ha2UnpmPXjlXN9zj631eyLwi0IhTk=; b=mltUW4KiEhGUVod5Lm9IE/php4GEjFrpPDnseiBKDHwkSQbE5fQDOv0iDD9JVnVnNb1ko0qfgZKGanTiPlMnU765UWqabH64BAoHC7W2h8CPc4YjVoekCyYBY/sRxc8czXT6oTR50Cu09vwVk+lq5OAqKfTDa9uSxW+5z3um2mhQarNssmO5AUok2iQnO7duJso2AqqHauu0mF1MA0EdelaIosKyo2JPKoKYbU/v/xXeez44wsakMyMJ3ivXOe3fOm+hBAj/0x6i6gNJbkotzxwTUHQHt34IC/PJutnvulnLAQSO+BXn2R+lWNYFMrhQQF8wWI2Q66VsQ+g7j85BNg== Received: from AM7EUR06FT022.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::40) by AM7EUR06HT018.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::414) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 20:17:42 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::53) by AM7EUR06FT022.mail.protection.outlook.com (2a01:111:e400:fc36::388) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Thu, 15 Apr 2021 20:17:42 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:4227A2065576E56A8B50634205875C7E7206C250D52E0ED50D53B2CF341B9DC5; UpperCasedChecksum:051D095C69B732D4258729DF4E0DC57AC0BB36957E857347325DE45C04756853; SizeAsReceived:7592; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 20:17:42 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Apr 2021 22:16:58 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [5PN6a7+QkvGwjSoljC/FpQHy8vRCZLrR] X-ClientProxiedBy: AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210415201659.1810798-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18 via Frontend Transport; Thu, 15 Apr 2021 20:17:42 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 281d95f8-72bc-48ad-f64f-08d9004b8653 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiTvkErHHM9AELLsJR433rIZOc1NncvWd99ScvJLKDWajt/3oajtMv9cuiGse53baST9Nu1WIajeQUtsfoEUAmWfntVcpGcxGjglE2QoE/qjXT71ldANCeT0oLely5n3AMHdouQXqUzQVQhZCmAJ1LD/YB7BFTkRTAK9G8lfmg2Pas+Vd0Ee/nhnbV539NJ4mLOSz8VqBNiiATe9r/chMj1dTWwJ6F219gJFI7bs5VUGgAi2iPhUtVY/Bb2nEVKRX4v3nPYZzuHjzYZNmrazaVTh6yvpVyDwRwPZku9fE4RpLHgchyPyXMwq7VSeFpu0UbVCM3h6JqC5WzGR81qEeHY7RmBkR6VUKcpgJ3VKQUfwi8lL6GxbD7PGCtsppySsdIjbHGD79vcN5D7XrfQZiab14ddLLS70Z6QZhw/RZCEV5QtRUpFbP/fTyEGW2M4GZfe2xMbNWicUvbGzgm0ArbsvG25T0TiWbTWpP+TskdwyFQBlFe3CxYdOYnr/ie/5t2o0AWORfIDx0tV2lLy7X4THeQKrvdhfPBn/8xnr0054tq+ehY90KmmFjtGKcg0HEqdzyQvoKWJd0mNDTzqYZ0YNqxoEKqGEumyjUBBsH4MPiPbpgqjK6EBOUf829kvasXdGzwEQ8DN2fxSlf6U4ovZMeaMVa8bXNEuMxyPbF5i2na3e4jq+XwFU9uGyeiaJGjXi+fbVCdcJlLLwWJjCHIe2Ty/3fL3i1ro11ClI5ya55zW+4iGVyJwqwKthrZbF/QA= X-MS-TrafficTypeDiagnostic: AM7EUR06HT018: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HNz5FVX/cEAduavi1dVjO4zPpuBvF+chT7zPnBfBpEiAITTwXssOcTY7e3X4YxYj952COQAIoT0KNJp4Vds37fCa888yNNcodIl34clZUnBvH4cXiZZDIcD/vM+2iu/O3UyYmxqrjDdqrs21Mu6suvWzmdHA0xu1fc3gKPwGj1XBNRQX+0SfbD9HdVIsLa8tnTTaR/EYNt1GObhtkUO7sPLwoCoxmtnhF0IFyPKS9OLdxS73hsgA8DoTm+egVqICTgNCubxdsfrrDMaKTyBTFwIEIhAqAlyjv9cchZAQaejYYo1PwXUjRQ7fXGmYjfcM8C08HdYTAXsya1/dB5frDyzTBoUQrc9gieuyIETnieOja5XH5YAH1gA6lCClNq80GeXXIdhPT8OGb8EqEUDc8g== X-MS-Exchange-AntiSpam-MessageData: gc0tOGZgW8jq8ZejbsPyOP1F9ipWwOCRLiMLAHqUsnGE0N+p5i7o40pMny+msgHzeVFMb+I/U8QPXc1y64HdCrV+cu+e2ti1aWKb3t8DDSh7E8vNBIBrjZZD4Uto8TmnnR+WSLTdLpeBakGUGKtEfg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 281d95f8-72bc-48ad-f64f-08d9004b8653 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2021 20:17:42.7911 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT022.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT018 Subject: [FFmpeg-devel] [PATCH 09/10] avformat/webm_chunk: Use ff_stream_encode_params_copy() 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" It is simpler and more complete (e.g. it copies the framerate information which allows to write the default duration element). Signed-off-by: Andreas Rheinhardt --- libavformat/webm_chunk.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c index f1bee5fa9f..fb5b20a8cc 100644 --- a/libavformat/webm_chunk.c +++ b/libavformat/webm_chunk.c @@ -93,15 +93,9 @@ static int webm_chunk_init(AVFormatContext *s) if (!(st = avformat_new_stream(oc, NULL))) return AVERROR(ENOMEM); - if ((ret = avcodec_parameters_copy(st->codecpar, ost->codecpar)) < 0 || - (ret = av_dict_copy(&st->metadata, ost->metadata, 0)) < 0) + if ((ret = ff_stream_encode_params_copy(st, ost)) < 0) return ret; - st->sample_aspect_ratio = ost->sample_aspect_ratio; - st->disposition = ost->disposition; - avpriv_set_pts_info(st, ost->pts_wrap_bits, ost->time_base.num, - ost->time_base.den); - if (wc->http_method) if ((ret = av_dict_set(&dict, "method", wc->http_method, 0)) < 0) return ret; From patchwork Thu Apr 15 20:16:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26943 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 33F0E44ACE3 for ; Thu, 15 Apr 2021 23:17:48 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1F75368A711; Thu, 15 Apr 2021 23:17:48 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR06-VI1-obe.outbound.protection.outlook.com (mail-vi1eur06olkn2058.outbound.protection.outlook.com [40.92.17.58]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 44EB268A6F9 for ; Thu, 15 Apr 2021 23:17:44 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WbP1lOu85Dlg2sYgXBcsp12GJlYl4TEXpVJy1u9obaYv72tsqPCffjQwCLWEkJQ1cgcYGl/1N3FRFimBRZ3fbrvTwUPeXYaNoV5Iwv4PiG/73jJ/QHm49LxQRrBOytNjDE5iIfbtRGRxtxNWMFVnRAnQT0MSKtUCCQnfBeHDKBpvhBB6gxsb3FB0/EAfVRonG/odbufVuwkxQ9DxeyYNQzAbZedIFL0gI6EWOf1zHaRfLWDT17WubjGuJ14NlvF2tHz16rtJDgsggby1HRPJ2XlUnGA2XNBpfVMMehVXdHuBKFOFXR2UHcQRkcbDnRfNna59C5KBU3/gg2NCT+QWeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q2pQ4Qh2tBKbcvcbfx65IJsDCR1O0v3cdjgPx0YgS0A=; b=lmTXUT+aSXkqSFLSUB/imvLIbZqKRMvbiFDlc2CClGBp+0NgIDPIeoTY1ieiIuM8nROX939OB6jCvIVDp4f9F8pFLdD1vwE7P/Dwe7IRBbg2xXyJmcdgCpBtbEiwVuTdrHo7ho5Ekfu4cEJNcezMaTVf28PAleYgPYPBgvKSNu/5NM+DHDWB9+6AjiG3se5E4fVMHZZ0OwOgLOeJ+GOWhBawQQoF/HBuW4BOGSJb0guR0pUxrlpa12czjyDeTj0828/aT97inMDdF/LntyNMTIY6ytR/gx4WrGctMyBhAhJBJ2TD07lPJlA9g4AP60sMKHbzz5yQLTkwBvJvSMwAIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q2pQ4Qh2tBKbcvcbfx65IJsDCR1O0v3cdjgPx0YgS0A=; b=R+h37FJ/cYV4z1UjL3vkSQMBvlRzYq8EMyrRpqtF/wapBym+uY1bdc81pLjlxSI35XMw78T/p3bwLvmW2oaKPPc1xa3j7cPecDoaQWm/fNixUkOBTLh+n02SjX4q6tKDtc40SocKYUwK2j8dBebOoWJ+T4DmyAX7q/g2gnSXRDXU4XmpDVWSiChgaXDxGq19xEnO2ws6HsJREvYJaLQS7F6TdZpZ3NSSd6SPCSgGDuy7Fn7W+/G4efDVa2uyfcYUuTzH/yrMc3LVY01r+yAKuoDk9pCiisL02DSbBzY46gU2/ALsx58yNQYGp7rlKmE1PLGphadnvS3ipx7cJgX6XA== Received: from AM7EUR06FT022.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::51) by AM7EUR06HT020.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc36::163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 15 Apr 2021 20:17:43 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:fc36::53) by AM7EUR06FT022.mail.protection.outlook.com (2a01:111:e400:fc36::388) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Thu, 15 Apr 2021 20:17:43 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:3244C3771416BC309DB86D176EBBB205D6988D318EEEF20F833A47C5E981085D; UpperCasedChecksum:4C05E72937D95BCC21C70D4CDDABB68A7F46CC057B2BBE3032AB49EAA91A856E; SizeAsReceived:7589; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.018; Thu, 15 Apr 2021 20:17:43 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Apr 2021 22:16:59 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [r8/9bgPIjqaZXanxnGjwvXPz8amArjCO] X-ClientProxiedBy: AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210415201659.1810798-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by AM4PR0501CA0060.eurprd05.prod.outlook.com (2603:10a6:200:68::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18 via Frontend Transport; Thu, 15 Apr 2021 20:17:42 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 7de021a4-8acb-43f9-498a-08d9004b86b3 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNXFKoSKZyiLYcPwGDHzH9eVYJG0LjAkS2O8jd4kIGEwb66NVdLzSjqqMVPHxhfuzBXhAxVj7UFtjPlUyTT0+s4OgbxVt1V1MHfx2ayWs0GdPuQuo1qAXtS4l7JjaWlieXPhxKGgB9v0sLB93Pg4GKGDXKAtOHkrRyfKQeuLAQCGX11EB0QQGjk49LU8PPEBaE50urXlO7iSprW+xuBDHt3+9e5xOYKEcwkDiPoDkLeYg8/w2bl0Nva8SYcA2aIRgjdC6iNcnNe1Zodh9tQ7rR9Id9kLyNZuijTOPejm3ynOo2MRY94Xp5DaqLSzaD4GIxbMPgnqI98hN6e+kUdGvBLC1hY5Ku2jjcpTTKK98qOzkm/GMCffg9GCG1uz/PxyeitxP94BCS5YB8bOrtVwZdfCR7I1rL1tAHdfGBOfeyfyJHov+FN2kDTnHPjAvUnarDnxxyijb4gXhmGJVPKobBn5PpeqG0D3RSvi5uU2cdLqu0EN9Qhj58UaR7VY4kLHQEpebbP4brMJzQ0b2urybDdVnxQq7QRy/HJvoaU84D/LW2VVJq9DZJrfoEcfZ/BF0gP2h7D3i+xbBlknKpbO0ZLlXZha1kTfhTPY723ILhFJlgL+xQO+7oJDfZ+0K/DNZOTFP6niLZypnL9BRQMH0lHS1/XL9zCkrP4RO46us+NKnRzaXC7n5eMrxlHmNG4WtLZWSSU3NBAeMEJjXFN1pemT85wDP1gCV90= X-MS-TrafficTypeDiagnostic: AM7EUR06HT020: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6Brp200I1JlVO9ySnG3g5OsXD/MBeYR8Aeyetqqufm1RfYqIUoBjNLH/V2dz5dmEa25IfcpTnogd95Kb1k2OKPmgzGOFb4HCG0x19fOnNs03glHC7xoTOxIudu2J6hkKF154O3b7N2gluoJ536NY0lyS2VwEoBocLcLuy+zlqtNkfLR3ajfxar0//Wa8lcxcDY8WSiv/OP77ZFKWn8Mq9TSV3p41v5BJXV6+SdzNxQ7Ur7uR9mJkVNXjNiGvctnbQybZFv6FrzPIZcJbQwZTuh7gYlpjgwWIT7e4xwIaQo+0dp1K0if5qbu/kCJSZr2OZUi4IwWU8hM7rCH0owbUJgBFvl/pihL1o8DLwY43bEkahnuB1BDdd2pPLPyJatRv4c3GcjF5e2d8ANStdO0KLA== X-MS-Exchange-AntiSpam-MessageData: 6j14gT8mE4mAfjaEe+L4ca3btOpbj7KNsIeL9X+T+g3a6ZPJHAAq9NSBO3Q1UmnKWSgmW/LurwOFw3EJu7obkTQ8A8xkS1B/G/GdKqokLxD/LPjKCRHPC1Y8M/er223k3pRFF67a6l2/3ERLbXqEQA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7de021a4-8acb-43f9-498a-08d9004b86b3 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2021 20:17:43.3938 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM7EUR06FT022.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7EUR06HT020 Subject: [FFmpeg-devel] [PATCH 10/10] avformat/segment: Use ff_stream_encode_params_copy() 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" It is simpler and more complete (e.g. it copies the id). Signed-off-by: Andreas Rheinhardt --- I wonder whether we should use ff_stream_encode_params_copy() in the other muxers with submuxers, too. libavformat/segment.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libavformat/segment.c b/libavformat/segment.c index 5265ecaebb..cd72e8b701 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -167,8 +167,10 @@ static int segment_mux_init(AVFormatContext *s) if (!(st = avformat_new_stream(oc, NULL))) return AVERROR(ENOMEM); + ret = ff_stream_encode_params_copy(st, ist); + if (ret < 0) + return ret; opar = st->codecpar; - avcodec_parameters_copy(opar, ipar); if (!oc->oformat->codec_tag || av_codec_get_id (oc->oformat->codec_tag, ipar->codec_tag) == opar->codec_id || av_codec_get_tag(oc->oformat->codec_tag, ipar->codec_id) <= 0) { @@ -176,17 +178,12 @@ static int segment_mux_init(AVFormatContext *s) } else { opar->codec_tag = 0; } - st->sample_aspect_ratio = ist->sample_aspect_ratio; - st->time_base = ist->time_base; - st->avg_frame_rate = ist->avg_frame_rate; - st->disposition = ist->disposition; #if FF_API_LAVF_AVCTX FF_DISABLE_DEPRECATION_WARNINGS if (ipar->codec_tag == MKTAG('t','m','c','d')) st->codec->time_base = ist->codec->time_base; FF_ENABLE_DEPRECATION_WARNINGS #endif - av_dict_copy(&st->metadata, ist->metadata, 0); } return 0;