From patchwork Sat Sep 10 19:58:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37836 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1645126pzh; Sat, 10 Sep 2022 12:59:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR7CtRiZO+lnK4tUfXQw5NggaUfDcDzf1bmxVUxk9kD3pHaTEjFlf9DKrFzgzuDPkLL90LF+ X-Received: by 2002:aa7:c61a:0:b0:44e:7d1d:7814 with SMTP id h26-20020aa7c61a000000b0044e7d1d7814mr16180363edq.44.1662839970222; Sat, 10 Sep 2022 12:59:30 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h10-20020a056402280a00b004477be72d56si2434815ede.521.2022.09.10.12.59.29; Sat, 10 Sep 2022 12:59:30 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=erj3oCrl; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9F7E268BB29; Sat, 10 Sep 2022 22:59:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-oln040092072064.outbound.protection.outlook.com [40.92.72.64]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 09A4568B9EC for ; Sat, 10 Sep 2022 22:59:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AIwsXRpoB2O0TRIcSV14hcTdeA+LwLN7cjtU8kuwE+BUd1sYIv+QgSQD6VLP6+g7OqYfHBkepUhMNRd93tswvENvWNfMysif4VeIxn2GfNI+XglsOYdBtD8cpfARxCjUWieQNBDrwpFIpTjUwfHq9UaBHvEjhccY60XbRy30nZYXs/Byk2FJai+oMca/Yd4tSoK9gFCPMK0ZZEjUxMMporXDIsUphl4mEFLnKdI9CSPZvhkW1R0+YppJ/tjelWJ+uXoE2/EElN0lVX/Cx7WfMSagwStTyX7z1VqRL6ppHEtBMq+blc2HdzIWLFZV6CMjcQBieCH3JkHVDqT9iMs49A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y6+NePtMFwsbU9H0/UybK9FJTeeu2z1qI/PPh/ch5vg=; b=BGbHNn2XyrYXhFGFLkPgIW2aW9w79uH27Mnbk+RtJJt5ASBfC/a4xqo8Ij3xSqd9AMjv6yGynLw5DYTL3u2m0Pq4BBIaLxD5buOQ+IWuYibs9mV8y6A5r3RRY0WC/E2TlNjKM29pfIbmjo2bSrapwbrZ6MG1yvftIU5bQhxqbI9IxcJ1BJg9PJmjRnH0uJUqXBQy2VjFZdU5WLRgEIlsdstBc9/vdNrVszPC7QfNZ2PWDb8Q5KLHqr/9uucYi6Aq72wCdtWnaYaY03no39nqp4G7m92HlqRz7byFHunMvRGeoPAOrMod5Wt5noLK7Y96HmH0xkQwb5awlz85wLM2jw== 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=Y6+NePtMFwsbU9H0/UybK9FJTeeu2z1qI/PPh/ch5vg=; b=erj3oCrllBNXuEzTj1klhYx65DU8L+/c+iPNX51zfekZKuSbLbspnrsAxGSUvkqI3wSxIkQWUfja79rU1oHUlN6HTsW6ihuaYTyBv2fnIlDeN+g4YqexDOiABheYubmYAPL+sWRzxKvfR2FjnLloWYg9Xw7vCQcq7gj8JzTDJEL3SMGlijd6KEqANGzsRmbM3z4s5fPcDYf34G8i9GImE6NVVIaXyY2kdpz896k2L52Xzb3+F3m5cx7Mbw3VahKrpoQZAeykYv+bL2uouxb/bXAj2XVljIxaEXsc6TId2kzvK7qPh1TYGwD9bj1qlHmpFXsPiAdSX9GQu7YqmUQLFg== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS8P250MB0219.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 19:59:18 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::36a0:c1e3:9fee:2125]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::36a0:c1e3:9fee:2125%2]) with mapi id 15.20.5612.022; Sat, 10 Sep 2022 19:59:18 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 21:58:22 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [vdTjjivAiGX9aZJlZvp0OeKDkuxxLtEHORK4AflczHo=] X-ClientProxiedBy: AS9PR06CA0178.eurprd06.prod.outlook.com (2603:10a6:20b:45c::10) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220910195823.3133712-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS8P250MB0219:EE_ X-MS-Office365-Filtering-Correlation-Id: 84d03c27-b910-4530-ba38-08da9366f124 X-MS-Exchange-SLBlob-MailProps: a+H6FLLcF3qo6C/2pr8DHB2giRZSNnyPfR+2/PY44o3zEVayFEwSUZhCGvppaEXHSQLg+RLmHivA5Az7MV+2QCdGlUhNsPz9zYF2Dx6+4t6F0uJiise29X6HKVBJYxB+epiWL54zWLmpW8JVbbYpiMfy0MPI7xDGtrifp9U9BV9jOvlaBZbiKpTxiM68iX6KKV73AGSqLGHX+MzD/YTUXtCEnMSH69prh5rTPQ/3+jmBTQMaa7V0XKDbzk9OVoRJCqxOzM+PCqapUiurruxOQt8y8Dz3wOa8P4Kh7Xom75z0afRl46ZbzYHo8K0NVURyep9hNXi1BGtbeSk8MHnNSTGYN4H9RbNvcL0qmFmiQsGLc+OCRZA6DZirspwhL9BQZkyP8r4AbOvSnGfGCH0dp0dClP1vFqLj6e/J1JrLySHeLs7b7y1fCnw9qhEx+RRWG71FTL8RI6xHE12go00bzVhbI7T+7moGW9Y1Dx/65cifC61yq8ICRAn0xDXbkMydOIGYf0nUk17UaWss3x6OkUMUm2TmHOCqDDAAql/jNUU8kmT9t/ikU+PKqmEJPFDafvfImGJFhTPqsDug2IoehJIanWkfABYXatR2SwGCT9FZSWuMzlTYGlM+GU2+oU0ElGYih++7LphyXxrjM5Scd/aOhZ1QBfgIhbuHLb+gLWtcTNBozbhvs6Wdg2VlxEOJRWa0UXZDGdja5HA78v4seDrT3kKcec9NqLZyOPgSiPGeEwpj47pqUdzr22bqXc97KrJfzXkEu15tcCXW/PhM/v0R4FQ4uL8T06hEqcklR6z3mw7f+L9KAz0Px1Ub2Hn1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fxZ3V4atNZzDgnsiPvRb27PDoMCk+8HDbmoUvPdfCcpvh/Ig12gWkM7ULcKUn/0EH5xOQwdQUK8GOwzoY5Ef5I9Qlsnm4/kIZOmqqSDj7fXTSgOjfQmkEZPAKWmYmkFZ6ESs5fa9ElGyjMyx21D/vFSzaF26vmmAyLg/4owZ4wllY4CkDqQL3kvgJxFeQz8S+K51icRdTOPs2Cq3JM3z0kYy7DAP1bxQtttOKTvvTV45m+iUPP1oG8/TKc32NPOezx7jsICZlOCdT1Ps10zdu9w4RE191vjm1VxOF9jlu8BiS9OkYOs1L4e0pRO2DqWORaKFwTSeNef5oXXb6Wczm7NIOh9eyx4zhOdro9wtSDrLjLoyqsOPA9xvAfhHtneIVMT58zEwAEmDFLg1SybgUkg6L7dbvE40LlWT45p+GjaLsdCIEpwYtLSH8h3MyuOIBG3JzWE9QN5ZsbfCoGB0CudOhhoiuQiShPTPttbSIHyKWypGL4HG0Q5XUjQJzeID+GrtMLWe3Q1N2t5qGLYj6HsVtYPgvFY4jY/jr/p0NCwKL8j+cnlIUNhxRdBMHRKnDg7S8TuiEPbtFi7Hmh6ZDbnk+tFIhZANI2bmXBn261nCSgdef0FkmrKsr/xy/xUToBC9U0b63TFAybmO/eLsAw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?HJrlrehbuR0YccQ/N6saFPnjpbpx?= =?utf-8?q?75HHX59uOmw1a5Wmib4SLBxZdkclgqiNOZEcLHYw+YghF+6nIczEBVAs8JrC+B9ZN?= =?utf-8?q?MLqmHO/A2Wf7/mANNCJqHK4E+h3qbat11281eNhKDbnJvS3CQyr6kgl69OHlxb4S1?= =?utf-8?q?YEP7G31N8Lw1U3Io76Y1ZxsaGKYmD6Bz03QQMVsEXKJZfF4Lvz8EDRzPxPHBAKSHw?= =?utf-8?q?oFN6A7K8EmfhJNcf2BmhyViCvv12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aTxBnhRyU48yTyac1Lmci6p04x7b8cHD5sSb?= =?utf-8?q?+SN1IHJhgwNwtTo6DHSu1+WXwcJzCBVkM4dj/9KL3MXTwMq8F8YQwHVk5E6Yc1qoF?= =?utf-8?q?Q1VBMSxwZf2cbsx1x/Og0r4LTKc3/HR2qod1uo4lxLGH44vf5WYa6IymW6LLdKY+G?= =?utf-8?q?sFIgIyZeQRkot2Y4?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84d03c27-b910-4530-ba38-08da9366f124 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 19:59:18.1609 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P250MB0219 Subject: [FFmpeg-devel] [PATCH 1/2] fate/id3v2: Add test for reading and writing UTF-16 BOM tags X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: B32B5PMPcNTC Signed-off-by: Andreas Rheinhardt --- tests/fate/id3v2.mak | 5 ++++ tests/ref/fate/id3v2-utf16-bom | 42 ++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 tests/ref/fate/id3v2-utf16-bom diff --git a/tests/fate/id3v2.mak b/tests/fate/id3v2.mak index 4dca681e38..7ad4d877a4 100644 --- a/tests/fate/id3v2.mak +++ b/tests/fate/id3v2.mak @@ -7,6 +7,11 @@ fate-id3v2-priv-remux: CMD = transcode mp3 $(TARGET_SAMPLES)/id3v2/id3v2_priv.mp FATE_ID3V2_FFMPEG_FFPROBE-$(call REMUX, AIFF, WAV_DEMUXER) += 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" +# Tests reading and writing UTF-16 BOM strings; also tests +# the AIFF muxer's and demuxer's ability to preserve channel layouts. +FATE_ID3V2_FFMPEG_FFPROBE-$(call REMUX, AIFF, WAV_DEMUXER FLAC_DEMUXER PCM_S16LE_DECODER MJPEG_DECODER ARESAMPLE_FILTER CHANNELMAP_FILTER PCM_S24BE_ENCODER) += fate-id3v2-utf16-bom +fate-id3v2-utf16-bom: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/yo.raw-short.wav aiff "-map 0:a -map 1:v -af aresample,channelmap=channel_layout=hexagonal,aresample -c:a pcm_s24be -c:v copy -write_id3v2 1 -id3v2_version 3 -map_metadata:g:0 1:g -map_metadata:s:v 1:g" "-c copy -t 0.05" "-show_entries stream=channel_layout:stream_tags:format_tags" "-i $(TARGET_SAMPLES)/cover_art/cover_art.flac" + 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-utf16-bom b/tests/ref/fate/id3v2-utf16-bom new file mode 100644 index 0000000000..dd2566de2b --- /dev/null +++ b/tests/ref/fate/id3v2-utf16-bom @@ -0,0 +1,42 @@ +9b8bfdf87a8d3d089819ef9f6f264ec4 *tests/data/fate/id3v2-utf16-bom.aiff +885482 tests/data/fate/id3v2-utf16-bom.aiff +#tb 0: 1/90000 +#media_type 0: video +#codec_id 0: mjpeg +#dimensions 0: 350x350 +#sar 0: 1/1 +#tb 1: 1/48000 +#media_type 1: audio +#codec_id 1: pcm_s24be +#sample_rate 1: 48000 +#channel_layout_name 1: hexagonal +0, 0, 0, 0, 19650, 0xd5662610 +1, 0, 0, 227, 4086, 0x00000000 +1, 227, 227, 227, 4086, 0x00000000 +1, 454, 454, 227, 4086, 0x00000000 +1, 681, 681, 227, 4086, 0x667b2643 +1, 908, 908, 227, 4086, 0x9a09957d +1, 1135, 1135, 227, 4086, 0x763e27c5 +1, 1362, 1362, 227, 4086, 0x2a47f536 +1, 1589, 1589, 227, 4086, 0xed32e5f2 +1, 1816, 1816, 227, 4086, 0x2e96c720 +1, 2043, 2043, 227, 4086, 0x84c5b5f0 +1, 2270, 2270, 227, 4086, 0xe3dfeefc +[STREAM] +channel_layout=hexagonal +[/STREAM] +[STREAM] +TAG:title=Дороги +TAG:comment=Other +[/STREAM] +[FORMAT] +TAG:artist=Мельница +TAG:RATING=0 +TAG:album=Ангелофрения +TAG:title=Дороги +TAG:tracktotal=11 +TAG:totaltracks=11 +TAG:genre=Folk +TAG:track=2 +TAG:date=2012 +[/FORMAT]