From patchwork Thu Sep 1 20:38:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37601 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp523753pzh; Thu, 1 Sep 2022 13:38:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR4pd5ADacepdjEhPU8M4lHAhc39GVy7O6UoiNLpWK7pyIbw2Y8lSG6iakzuGr6ZhjPoVfa7 X-Received: by 2002:a17:907:3e8b:b0:741:9c2e:1afb with SMTP id hs11-20020a1709073e8b00b007419c2e1afbmr13918825ejc.701.1662064725968; Thu, 01 Sep 2022 13:38:45 -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 ds10-20020a170907724a00b007417a7433acsi273650ejc.23.2022.09.01.13.38.43; Thu, 01 Sep 2022 13:38:45 -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=la7ptyqf; 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 5746368B83F; Thu, 1 Sep 2022 23:38:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2080.outbound.protection.outlook.com [40.92.59.80]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D870C68B440 for ; Thu, 1 Sep 2022 23:38:31 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MLMQCYxFOTlVY2QJjwGphe/DjMvu8FxmW3KqoRSdcM+Qx4Uquo7MXKJpaGriBrYRh+FoeeKAHmbqF4jVtX6SrnZOStF+B5k9fLfFNZo76G1vnCYkzvCdFxyTTH18aeSl3jdQtsnWdSXEz/7pMQuDAA33iiQ9+lielkJmM8UMkF27TZB2nAiWsrdK5yePANXp0rZzifiUebyi7sFvtaSoitN4ikij/zDYFFn47wuYtik2RrNTUEyYsQQJceYh40/w3zB6dXwEqP9fJwpW5srcDLKWyHXGwIz6TG8vWjUQbjDuyuD8NaWgUY4yk222/aU9sBTgF11mrPjF5DLHtE8OKw== 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=86mkm0SY3OJ9z2fgX/+ic8XaDIjgIbKYy1WpI5nen4s=; b=POVFSZZA/LCy31Bl9W8LmlrUabAVRlaPaf6IE4VWPFxl3Vfl2o5t2wTfHBRkXAICYNPc3SSemvmCsHZzoxre5WYCvkRmgPud9lUp1edIK7xtreHUPdTUT8LLeaUPikLLbm02LhTCOz5G7LI9LA4BxohuzKsG+TvNHdSSH+ygXN72ySF+PktNzfKDpsadfNGjm32lyhEYid/DFKZvUq99rmdoTEtUVPY6o6f/tu5i0HeXBWpxr1jlwgvHPQHhdYPeuX/eAVAhcx7+rLtqvl8uOhYk+ClQlSxg+2yGD3jlPJoWWXL6UGZTZsxfX3IXG4/LEVCqlmMGundWZDfYVur4mA== 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=86mkm0SY3OJ9z2fgX/+ic8XaDIjgIbKYy1WpI5nen4s=; b=la7ptyqffrMcl1R7BaD8bY4NpiHo7Ajr+90a3UUQAY0icqmRML2lY0va/CNpTuZ7+Ev+XbihgMfF8anzzhH60zJDgG/gyjGIhHkPCS+nFP8hS3/E8yls0yblygG2osEiexUpVaMy8YgXUzoEX6yUTWOz8RYxpZpJowMeyST10popeu4TgZutVzWpHBbjgviSdQ9i3XcmHzHWj0aluZRl/RQd0FrYvQg8CN5fTpnR+DWheqeg1s1UQADc0D5IADB9R0EoRJw3ADc8olaugVwCgSNodp6HLDDJGGi0GFB2YG34e957VXMU5UkbK4PEIgOeIsl4LHq3VL1h0Y7jm11MDg== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS4P250MB0919.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:58b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Thu, 1 Sep 2022 20:38:29 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6%7]) with mapi id 15.20.5588.010; Thu, 1 Sep 2022 20:38:29 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Sep 2022 22:38:06 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [77vmLOOu4G/m1/O0klcbC8dgPtEVzT+g] X-ClientProxiedBy: ZR2P278CA0037.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:47::19) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220901203813.2606717-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e79ded6e-e906-4674-b41b-08da8c59ed4c X-MS-Exchange-SLBlob-MailProps: F1hkHhp8ba4heQJw/wdWMjD0/V9B3cBOOWbtawc7Rx7If0o4KXyLlDZxHaCyzaJeH/R/jVWc2DN2OQUoUuWJAiBhjU663vJbhF0+Bg7Ahm0QUZTF8pif9rNmQw9rIkEB79YcTXruHbjeoetEFQiEmkucbx+HoQQIsUWtCrQ+VoU/+LzY/vnU64pB19XQ5/XGY0IXtpNiZQQIRgrTiwdF/y+OAyQzoE1/JQsjXZqD/HY27zieeEp3Z3TAF91ibnmceJjhL3qSsWz25FbNwNWfAh+Wr5uMmljiJifjjQqzGb1S/R7y+Qk6lWaH99YiXlJRt3gwrAO4bRbTeDK3C3rhK435r895yoJluDrwU08dI/jNUdulw1MStS6v+f0k68Ru+fdvu21ucIe/h3FiDUxPRzPEE5yJRtH2QocywUm4DUDt/E4k1im5u+Ta1RioEYCea0fUahNuQp2Rb2+8peamod9KGlosOLB8jy4eixwHg5BBmUdTvoU8ZUQT5c15uEs7uvZvvOpMLxMBGhxH3P96uzu3bB7eRIkCCNKx6/I7LWVwlxwab68ub9h00N8YafvIIMV0M98roP02o/G/9AaByXr1F0bD+YCAPoOybcqg+MspGDESbK0IbLZgH37MzdCrJkGH8bdSmh8cxj3XcrilHAg2pqzUHHL5yi+n8ToJEHcj0mlyoZg3Ca5HxP7+G/kXjSEDFTKQEzhCnNwkMTYJkFYkuly4wKDWXZJPpt3VsnrvqcTqu7xPLqQ5VNJOy4ZtIERECogzK8bUYVDGbMXKgDLs7yE3ppPR/8t6XEvFGdDZ+XMalAXEqsrqkd1uiLj3Sk3A0HlTq5uabi4YfMPBnOqe4IdCsXQ18takH96HRsioXkyzOZOUHHEruTowVXSzbmkMAwSOWEovWcbzyqXpkW60y4gCJknoW+JidaoLELhdDgfZspzYupIJV6839t+j X-MS-TrafficTypeDiagnostic: AS4P250MB0919:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KfI26osQe4tnLPiwsM9KIC0LCv7PZoieb18ndmRq6HaitmIO03rTjDCmSJRXsHHXZVnIOS6AziRkW+2ZiryYq96GHuiHvQzvkhyES9i1KiR7jIyU8kRVj/rFThS4NQAh+84Gwfb7Z/zKmIRvHwmN2ZNoZa/RpV6X7SXKHJ4vgfEiKVTnuXCT97sSZ1LBLUC2Fg/ry49NuMLFuV87yZ29cRVklRM26mbB2qF4TE9v/iWiJcvoVd3TuYMkvkolFNKr+mKtR1bgYVanV++vjf6a4B7ctzqrvf8MtHsGOPtz98Drw0j+I4Ay32gjyghsqwCrP14MeJrcRJA2ws30XBf4/f3NiL/Ag+h5oqVGPyKUKosuZajH0qflCvoXyU1PwDHKsYq/fcPA8V5a5l+JixSqbHgDQ4aBdYueYNHiZz/jNcMszHiFH+sn8sL8eQtIKAmg+2tOVZfl2WFUIzINOeCmk9o2F3UjNV9XzRbSCHF6MR8vHX/QK+VVgBH864UD92BNhesSBKBcWFqe6UVDY+qjwM13WhFZlcN0QpeViRppMfiHwL0WqylXnhhKXwnfaQjs3hk3Ui9R1x7UKBoxSKdm/g== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?vqjierzVQxIsUJJFX0mEh7SnmJCg?= =?utf-8?q?ugkddEHE4W8ojxC/IxueFoYLLZ+lyiBkTXByrVsVZbfNChedPuM1pF+rnFHknHkb1?= =?utf-8?q?LURQjhVjTM5zMP7ATKzn94yM1pI/fKrI51r/6iqHZXUDoGA0br1wNzu4KaR/hU2eM?= =?utf-8?q?b88eJKXSpUwGJv84OyommefxoVdBAuQv452uh+RgpLQSIaI2z6Xo5FL1M3pRx0NSD?= =?utf-8?q?yjEAnPNMrAiLmflV9V1XJdTJMsY+Pmvt23SZf9WiIUe0dgQi7XuSIWTBR7cXcePhf?= =?utf-8?q?tF5YCJhUPYBQYuauoAEkxNbb27uOVGNQS1YC1Pj3QYJD2mp62tmPDqetMBDS8XJ/E?= =?utf-8?q?NtsUznvSrAUzWSJo4ww7U1gjYaLgrKKS/RzgWbvOM1csNAqH2MOqGhJfnUX9PENgO?= =?utf-8?q?7KKGTlP6LTcCR8h+addLzkGOFzpeHZz70ma12dNK9alYfuYXcSnmcOrV1i8Zk2DK6?= =?utf-8?q?S38SpNWmyyCLmcstGdub4x8sj2Qb+WQwVgcdv+7alPKNgpvcL80cn5i26GB6ixsYZ?= =?utf-8?q?BNOOztsyTjYlOUUROvKvma7J/ljeB29qaQbWUNbej6r5mTFXEnfouca2Dcm4z4XT2?= =?utf-8?q?PKXstX10zHZ4Lj7hnsyJoBwL0oBLdY3cmTsn+qUlzjUMuxMp+K+r5j2VUUy7c8jBp?= =?utf-8?q?zI9I1hZGflzCH3Xn4AcfYf8oZhu84zsr79fb7nyJHr9LqJiyh6ziyIL5vox0X11rl?= =?utf-8?q?jnZe8FCWrPpdtbas4dPBzsJ302KZCXYYTpnhnSTgwdk6zIOK2H6uHYP9fJhObACwm?= =?utf-8?q?ksen0PrBvo6/bZ/WktX1/0nW6Oahq0b76hmS4ysWBoruLfMQ1WsyFIc9Rwo+cbuAq?= =?utf-8?q?78Hj5XuQ3iMoXSdBX8GkNqN0i+LISei6G0fvQWfAFElqIaAizDrQyMpyO422sUyzi?= =?utf-8?q?UguqRTpXa/vgaR/il02ZPnm/0N6yHZKCU9DsmjQXg5mgg74kVklmk+dori6zBnkTH?= =?utf-8?q?+9Z6V7BIELGOYgLQ7DFJPvOzafQgagf9cJwaTKPTIdfIGrBQLw5WyKEADeXkpdXvK?= =?utf-8?q?fl8fFIdEDQ1t1huANrlLHS6WQy3cBfwOp/Jg+UHpdk/ASHg/JMOyQFBd8fPpJUgMJ?= =?utf-8?q?t1I5G7khLqjlBrEjjcaHbJiNopfnjuWcCY5G5cG1+V3WFwzLjwO8L8BihTG66dsjH?= =?utf-8?q?idOmnyiJQ65guKIiGi45/EJl8jyGEryJ4QwybkwcVdDyjM4zurczevz5lcg3r5dJ2?= =?utf-8?q?DOARQu3DkuFJv+bzAuU1EYrKRJuAeAAfGyhH88K/ktpL1Ns/EGvuHcFdpizs=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e79ded6e-e906-4674-b41b-08da8c59ed4c X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 20:38:29.1768 (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: AS4P250MB0919 Subject: [FFmpeg-devel] [PATCH 1/8] fftools/ffprobe: Report initial and trailing padding 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: /u1BtRmUS5bw Signed-off-by: Andreas Rheinhardt --- trailing_padding seems to be unused and could actually be deprecated. doc/ffprobe.xsd | 2 ++ fftools/ffprobe.c | 3 +++ tests/ref/fate/concat-demuxer-extended-lavf-mxf | 2 +- tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 | 2 +- tests/ref/fate/concat-demuxer-simple1-lavf-mxf | 2 +- tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 | 2 +- tests/ref/fate/concat-demuxer-simple2-lavf-ts | 2 +- tests/ref/fate/ffprobe_compact | 2 +- tests/ref/fate/ffprobe_csv | 2 +- tests/ref/fate/ffprobe_default | 2 ++ tests/ref/fate/ffprobe_flat | 2 ++ tests/ref/fate/ffprobe_ini | 2 ++ tests/ref/fate/ffprobe_json | 2 ++ tests/ref/fate/ffprobe_xml | 2 +- tests/ref/fate/flv-demux | 2 +- tests/ref/fate/gapless-mp3-side-data | 2 +- tests/ref/fate/mxf-probe-applehdr10 | 4 ++++ tests/ref/fate/mxf-probe-d10 | 2 ++ tests/ref/fate/mxf-probe-dv25 | 4 ++++ tests/ref/fate/oggopus-demux | 2 +- tests/ref/fate/ts-demux | 4 ++-- tests/ref/fate/ts-opus-demux | 2 +- 22 files changed, 37 insertions(+), 14 deletions(-) diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd index 6e678a9970..6052a5eff4 100644 --- a/doc/ffprobe.xsd +++ b/doc/ffprobe.xsd @@ -246,6 +246,8 @@ + + diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 3344a06409..9eb20fa4cd 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3044,6 +3044,9 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id } print_int("bits_per_sample", av_get_bits_per_sample(par->codec_id)); + + print_int("initial_padding", par->initial_padding); + print_int("trailing_padding", par->trailing_padding); break; case AVMEDIA_TYPE_SUBTITLE: diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf b/tests/ref/fate/concat-demuxer-extended-lavf-mxf index 543c7d6a8c..973ce5d4a4 100644 --- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf +++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf @@ -1 +1 @@ -d367d7f6df7292cbf454c6d07fca9b04 *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe +3fa8632676f0e40c42be38b842794afc *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 index 57b22848b9..905ae46343 100644 --- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 +++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 @@ -1 +1 @@ -1fac6962d4c5f1070d0d2db5ab7d86aa *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe +f88c5d6b16ec3ffd5d35b64a031489be *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf index dcc98e9bdb..c227fa534c 100644 --- a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf +++ b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf @@ -100,4 +100,4 @@ video|0|33|1.320000|33|1.320000|1|0.040000|12362|195072|__|1|Strings Metadata audio|1|65280|1.360000|65280|1.360000|1920|0.040000|3840|207872|K_|1|Strings Metadata video|0|37|1.480000|34|1.360000|1|0.040000|24786|212480|K_|1|Strings Metadata 0|mpeg2video|4|video|[0][0][0][0]|0x0000|352|288|0|0|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|1|N/A|25/1|25/1|1/25|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|51|22|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001|CPB properties|0|0|0|49152|-1 -1|pcm_s16le|unknown|audio|[0][0][0][0]|0x0000|s16|48000|1|unknown|16|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|768000|N/A|N/A|N/A|N/A|50|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001 +1|pcm_s16le|unknown|audio|[0][0][0][0]|0x0000|s16|48000|1|unknown|16|0|0|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|768000|N/A|N/A|N/A|N/A|50|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001 diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 index 8937724ed1..f26e3c2e1b 100644 --- a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 +++ b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 @@ -69,4 +69,4 @@ audio|1|63360|1.320000|63360|1.320000|1920|0.040000|7680|1861632|K_|1|Strings Me video|0|34|1.360000|34|1.360000|1|0.040000|150000|1924096|K_|1|Strings Metadata audio|1|65280|1.360000|65280|1.360000|1920|0.040000|7680|2074624|K_|1|Strings Metadata 0|mpeg2video|0|video|[0][0][0][0]|0x0000|720|608|0|0|0|0|0|1:1|45:38|yuv422p|5|tv|unknown|unknown|unknown|topleft|tb|1|N/A|25/1|25/1|1/25|0|0.000000|N/A|N/A|30000000|N/A|N/A|N/A|N/A|35|22|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001|CPB properties|30000000|0|0|1212416|-1 -1|pcm_s16le|unknown|audio|[0][0][0][0]|0x0000|s16|48000|2|unknown|16|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|1536000|N/A|N/A|N/A|N/A|35|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001 +1|pcm_s16le|unknown|audio|[0][0][0][0]|0x0000|s16|48000|2|unknown|16|0|0|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|1536000|N/A|N/A|N/A|N/A|35|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001 diff --git a/tests/ref/fate/concat-demuxer-simple2-lavf-ts b/tests/ref/fate/concat-demuxer-simple2-lavf-ts index 9603ca21d0..5d03e5cd50 100644 --- a/tests/ref/fate/concat-demuxer-simple2-lavf-ts +++ b/tests/ref/fate/concat-demuxer-simple2-lavf-ts @@ -211,5 +211,5 @@ video|1|171982|1.910911|168382|1.870911|3600|0.040000|17440|206988|__|MPEGTS Str video|1|175582|1.950911|171982|1.910911|3600|0.040000|15019|224848|__|MPEGTS Stream ID|224 -0|mp2|unknown|audio|[3][0][0][0]|0x0003|s16p|44100|1|mono|0|N/A|0/0|0/0|1/90000|0|0.000000|N/A|N/A|64000|N/A|N/A|N/A|N/A|89|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 0 +0|mp2|unknown|audio|[3][0][0][0]|0x0003|s16p|44100|1|mono|0|0|0|N/A|0/0|0/0|1/90000|0|0.000000|N/A|N/A|64000|N/A|N/A|N/A|N/A|89|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 0 1|mpeg2video|4|video|[2][0][0][0]|0x0002|352|288|0|0|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|1|N/A|25/1|25/1|1/90000|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|60|22|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 1|CPB properties|0|0|0|49152|-1 diff --git a/tests/ref/fate/ffprobe_compact b/tests/ref/fate/ffprobe_compact index 5374bfca03..4f7cc1e09d 100644 --- a/tests/ref/fate/ffprobe_compact +++ b/tests/ref/fate/ffprobe_compact @@ -26,7 +26,7 @@ packet|codec_type=video|stream_index=1|pts=6144|pts_time=0.120000|dts=6144|dts_t frame|media_type=video|stream_index=1|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|duration=2048|duration_time=0.040000|pkt_pos=793142|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified packet|codec_type=video|stream_index=2|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|size=30000|pos=1023566|flags=K_ frame|media_type=video|stream_index=2|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|duration=2048|duration_time=0.040000|pkt_pos=1023566|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified -stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_tag_string=PSD[16]|codec_tag=0x10445350|sample_fmt=s16|sample_rate=44100|channels=1|channel_layout=unknown|bits_per_sample=16|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=705600|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:E=mc²|tag:encoder=Lavc pcm_s16le +stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_tag_string=PSD[16]|codec_tag=0x10445350|sample_fmt=s16|sample_rate=44100|channels=1|channel_layout=unknown|bits_per_sample=16|initial_padding=0|trailing_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=705600|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:E=mc²|tag:encoder=Lavc pcm_s16le stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=320|height=240|coded_width=320|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:title=foobar|tag:duration_ts=field-and-tags-conflict-attempt|tag:encoder=Lavc rawvideo stream|index=2|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=100|height=100|coded_width=100|coded_height=100|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=1:1|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:encoder=Lavc rawvideo format|filename=tests/data/ffprobe-test.nut|nb_streams=3|nb_programs=0|format_name=nut|start_time=0.000000|duration=0.120000|size=1053646|bit_rate=70243066|probe_score=100|tag:title=ffprobe test file|tag:comment='A comment with CSV, XML & JSON special chars': |tag:comment2=I ♥ Üñîçød€ diff --git a/tests/ref/fate/ffprobe_csv b/tests/ref/fate/ffprobe_csv index 7af4db7bc0..22a997c55f 100644 --- a/tests/ref/fate/ffprobe_csv +++ b/tests/ref/fate/ffprobe_csv @@ -26,7 +26,7 @@ packet,video,1,6144,0.120000,6144,0.120000,2048,0.040000,230400,793142,K_ frame,video,1,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,2048,0.040000,793142,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified packet,video,2,6144,0.120000,6144,0.120000,2048,0.040000,30000,1023566,K_ frame,video,2,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,2048,0.040000,1023566,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified -stream,0,pcm_s16le,unknown,audio,PSD[16],0x10445350,s16,44100,1,unknown,16,N/A,0/0,0/0,1/44100,0,0.000000,N/A,N/A,705600,N/A,N/A,N/A,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,mc²,Lavc pcm_s16le +stream,0,pcm_s16le,unknown,audio,PSD[16],0x10445350,s16,44100,1,unknown,16,0,0,N/A,0/0,0/0,1/44100,0,0.000000,N/A,N/A,705600,N/A,N/A,N/A,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,mc²,Lavc pcm_s16le stream,1,rawvideo,unknown,video,RGB[24],0x18424752,320,240,320,240,0,0,0,1:1,4:3,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,foobar,field-and-tags-conflict-attempt,Lavc rawvideo stream,2,rawvideo,unknown,video,RGB[24],0x18424752,100,100,100,100,0,0,0,1:1,1:1,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Lavc rawvideo format,tests/data/ffprobe-test.nut,3,0,nut,0.000000,0.120000,1053646,70243066,100,ffprobe test file,"'A comment with CSV, XML & JSON special chars': ",I ♥ Üñîçød€ diff --git a/tests/ref/fate/ffprobe_default b/tests/ref/fate/ffprobe_default index f296fc0dc2..6541b8950f 100644 --- a/tests/ref/fate/ffprobe_default +++ b/tests/ref/fate/ffprobe_default @@ -574,6 +574,8 @@ sample_rate=44100 channels=1 channel_layout=unknown bits_per_sample=16 +initial_padding=0 +trailing_padding=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 diff --git a/tests/ref/fate/ffprobe_flat b/tests/ref/fate/ffprobe_flat index 655c0fe836..d72166c361 100644 --- a/tests/ref/fate/ffprobe_flat +++ b/tests/ref/fate/ffprobe_flat @@ -517,6 +517,8 @@ streams.stream.0.sample_rate="44100" streams.stream.0.channels=1 streams.stream.0.channel_layout="unknown" streams.stream.0.bits_per_sample=16 +streams.stream.0.initial_padding=0 +streams.stream.0.trailing_padding=0 streams.stream.0.id="N/A" streams.stream.0.r_frame_rate="0/0" streams.stream.0.avg_frame_rate="0/0" diff --git a/tests/ref/fate/ffprobe_ini b/tests/ref/fate/ffprobe_ini index 58f508faa6..2c299fc51a 100644 --- a/tests/ref/fate/ffprobe_ini +++ b/tests/ref/fate/ffprobe_ini @@ -576,6 +576,8 @@ sample_rate=44100 channels=1 channel_layout=unknown bits_per_sample=16 +initial_padding=0 +trailing_padding=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 diff --git a/tests/ref/fate/ffprobe_json b/tests/ref/fate/ffprobe_json index 2e8b39f126..2e17195e69 100644 --- a/tests/ref/fate/ffprobe_json +++ b/tests/ref/fate/ffprobe_json @@ -558,6 +558,8 @@ "sample_rate": "44100", "channels": 1, "bits_per_sample": 16, + "initial_padding": 0, + "trailing_padding": 0, "r_frame_rate": "0/0", "avg_frame_rate": "0/0", "time_base": "1/44100", diff --git a/tests/ref/fate/ffprobe_xml b/tests/ref/fate/ffprobe_xml index e5152655b9..0cad5b8842 100644 --- a/tests/ref/fate/ffprobe_xml +++ b/tests/ref/fate/ffprobe_xml @@ -32,7 +32,7 @@ - + diff --git a/tests/ref/fate/flv-demux b/tests/ref/fate/flv-demux index a7c98d3d76..fc315cec54 100644 --- a/tests/ref/fate/flv-demux +++ b/tests/ref/fate/flv-demux @@ -604,5 +604,5 @@ packet|codec_type=video|stream_index=0|pts=11645|pts_time=11.645000|dts=11645|dt packet|codec_type=audio|stream_index=1|pts=11656|pts_time=11.656000|dts=11656|dts_time=11.656000|duration=46|duration_time=0.046000|size=346|pos=510431|flags=K_|data_hash=CRC32:4e6b44cb packet|codec_type=video|stream_index=0|pts=11678|pts_time=11.678000|dts=11678|dts_time=11.678000|duration=33|duration_time=0.033000|size=1190|pos=510794|flags=__|data_hash=CRC32:a0206c90 stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|width=426|height=240|coded_width=426|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=1|sample_aspect_ratio=1:1|display_aspect_ratio=71:40|pix_fmt=yuv420p|level=21|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=left|field_order=progressive|refs=1|is_avc=true|nal_length_size=4|id=N/A|r_frame_rate=30000/1001|avg_frame_rate=30/1|time_base=1/1000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=393929|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=351|extradata_size=39|extradata_hash=CRC32:07b85ca9|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0 -stream|index=1|codec_name=aac|profile=1|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=22050|channels=2|channel_layout=stereo|bits_per_sample=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/1000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=67874|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=252|extradata_size=2|extradata_hash=CRC32:d039c029|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0 +stream|index=1|codec_name=aac|profile=1|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=22050|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|trailing_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/1000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=67874|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=252|extradata_size=2|extradata_hash=CRC32:d039c029|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0 format|filename=Enigma_Principles_of_Lust-part.flv|nb_streams=2|nb_programs=0|format_name=flv|start_time=0.000000|duration=210.209999|size=512000|bit_rate=19485|probe_score=100|tag:hasKeyframes=true|tag:hasMetadata=true|tag:datasize=11970544|tag:hasVideo=true|tag:canSeekToEnd=false|tag:lasttimestamp=210|tag:lastkeyframetimestamp=210|tag:audiosize=1791332|tag:hasAudio=true|tag:audiodelay=0|tag:videosize=10176110|tag:metadatadate=2011-02-27T11:00:33.125000Z|tag:metadatacreator=inlet media FLVTool2 v1.0.6 - http://www.inlet-media.de/flvtool2|tag:hasCuePoints=false diff --git a/tests/ref/fate/gapless-mp3-side-data b/tests/ref/fate/gapless-mp3-side-data index 59907f8ca4..6579b980aa 100644 --- a/tests/ref/fate/gapless-mp3-side-data +++ b/tests/ref/fate/gapless-mp3-side-data @@ -596,5 +596,5 @@ packet|codec_type=audio|stream_index=0|pts=218603520|pts_time=15.490612|dts=2186 |data_hash=CRC32:d5fb5f9c packet|codec_type=audio|stream_index=0|pts=218972160|pts_time=15.516735|dts=218972160|dts_time=15.516735|duration=368640|duration_time=0.026122|size=418|pos=249718|flags=K_|side_data|side_data_type=Skip Samples|skip_samples=0|discard_padding=1152|skip_reason=0|discard_reason=0 |data_hash=CRC32:3789f3cf -stream|index=0|codec_name=mp3|profile=unknown|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/14112000|start_pts=353600|start_time=0.025057|duration_ts=219340800|duration=15.542857|bit_rate=128000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=595|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:encoder=LAME3.93 +stream|index=0|codec_name=mp3|profile=unknown|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|trailing_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/14112000|start_pts=353600|start_time=0.025057|duration_ts=219340800|duration=15.542857|bit_rate=128000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=595|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:encoder=LAME3.93 format|filename=gapless.mp3|nb_streams=1|nb_programs=0|format_name=mp3|start_time=0.025057|duration=15.542857|size=250264|bit_rate=128812|probe_score=51|tag:title=test diff --git a/tests/ref/fate/mxf-probe-applehdr10 b/tests/ref/fate/mxf-probe-applehdr10 index 90eefad6ad..e0803239ba 100644 --- a/tests/ref/fate/mxf-probe-applehdr10 +++ b/tests/ref/fate/mxf-probe-applehdr10 @@ -86,6 +86,8 @@ sample_rate=48000 channels=1 channel_layout=unknown bits_per_sample=24 +initial_padding=0 +trailing_padding=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 @@ -131,6 +133,8 @@ sample_rate=48000 channels=1 channel_layout=unknown bits_per_sample=24 +initial_padding=0 +trailing_padding=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 diff --git a/tests/ref/fate/mxf-probe-d10 b/tests/ref/fate/mxf-probe-d10 index b2692c6513..2897a3a821 100644 --- a/tests/ref/fate/mxf-probe-d10 +++ b/tests/ref/fate/mxf-probe-d10 @@ -77,6 +77,8 @@ sample_rate=48000 channels=8 channel_layout=unknown bits_per_sample=16 +initial_padding=0 +trailing_padding=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 diff --git a/tests/ref/fate/mxf-probe-dv25 b/tests/ref/fate/mxf-probe-dv25 index 67a510fc5c..7408d4fd60 100644 --- a/tests/ref/fate/mxf-probe-dv25 +++ b/tests/ref/fate/mxf-probe-dv25 @@ -68,6 +68,8 @@ sample_rate=48000 channels=1 channel_layout=unknown bits_per_sample=16 +initial_padding=0 +trailing_padding=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 @@ -113,6 +115,8 @@ sample_rate=48000 channels=1 channel_layout=unknown bits_per_sample=16 +initial_padding=0 +trailing_padding=0 id=N/A r_frame_rate=0/0 avg_frame_rate=0/0 diff --git a/tests/ref/fate/oggopus-demux b/tests/ref/fate/oggopus-demux index 7ea5dfe8a0..ce375bc037 100644 --- a/tests/ref/fate/oggopus-demux +++ b/tests/ref/fate/oggopus-demux @@ -41,5 +41,5 @@ packet|codec_type=audio|stream_index=0|pts=36124|pts_time=0.752583|dts=36124|dts packet|codec_type=audio|stream_index=0|pts=37084|pts_time=0.772583|dts=37084|dts_time=0.772583|duration=960|duration_time=0.020000|size=217|pos=841|flags=K_|data_hash=CRC32:06797ece packet|codec_type=audio|stream_index=0|pts=38044|pts_time=0.792583|dts=38044|dts_time=0.792583|duration=356|duration_time=0.007417|size=359|pos=841|flags=K_|side_data|side_data_type=Skip Samples|skip_samples=0|discard_padding=604|skip_reason=0|discard_reason=0 |data_hash=CRC32:01ca3f8f -stream|index=0|codec_name=opus|profile=unknown|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=48000|channels=2|channel_layout=stereo|bits_per_sample=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/48000|start_pts=0|start_time=0.000000|duration_ts=38756|duration=0.807417|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=41|extradata_size=19|extradata_hash=CRC32:58ba5ff3|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:ENCODER=opusenc from opus-tools 0.1.9|tag:ENCODER_OPTIONS=--discard-comments +stream|index=0|codec_name=opus|profile=unknown|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=48000|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=356|trailing_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/48000|start_pts=0|start_time=0.000000|duration_ts=38756|duration=0.807417|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=41|extradata_size=19|extradata_hash=CRC32:58ba5ff3|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:ENCODER=opusenc from opus-tools 0.1.9|tag:ENCODER_OPTIONS=--discard-comments format|filename=intro-partial.opus|nb_streams=1|nb_programs=0|format_name=ogg|start_time=0.000000|duration=0.807417|size=10250|bit_rate=101558|probe_score=100 diff --git a/tests/ref/fate/ts-demux b/tests/ref/fate/ts-demux index a90c65ce1c..e6c35a990f 100644 --- a/tests/ref/fate/ts-demux +++ b/tests/ref/fate/ts-demux @@ -42,6 +42,6 @@ packet|codec_type=video|stream_index=0|pts=3912686363|pts_time=43474.292922|dts= packet|codec_type=audio|stream_index=1|pts=3912644825|pts_time=43473.831389|dts=3912644825|dts_time=43473.831389|duration=2880|duration_time=0.032000|size=906|pos=474888|flags=K_|data_hash=CRC32:0893d398 packet|codec_type=audio|stream_index=2|pts=3912645580|pts_time=43473.839778|dts=3912645580|dts_time=43473.839778|duration=2880|duration_time=0.032000|size=354|pos=491808|flags=K_|data_hash=CRC32:f5963fa6 stream|index=0|codec_name=mpeg2video|profile=4|codec_type=video|codec_tag_string=[2][0][0][0]|codec_tag=0x0002|width=1280|height=720|coded_width=0|coded_height=0|closed_captions=0|film_grain=0|has_b_frames=1|sample_aspect_ratio=1:1|display_aspect_ratio=16:9|pix_fmt=yuv420p|level=4|color_range=tv|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=left|field_order=progressive|refs=1|id=0x31|r_frame_rate=60000/1001|avg_frame_rate=60000/1001|time_base=1/90000|start_pts=3912669846|start_time=43474.109400|duration_ts=19519|duration=0.216878|bit_rate=15000000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=15|extradata_size=150|extradata_hash=CRC32:53134fa8|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|side_data|side_data_type=CPB properties|max_bitrate=15000000|min_bitrate=0|avg_bitrate=0|buffer_size=9781248|vbv_delay=-1 -stream|index=1|codec_name=ac3|profile=unknown|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|sample_fmt=fltp|sample_rate=48000|channels=6|channel_layout=5.1(side)|bits_per_sample=0|id=0x34|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3912633305|start_time=43473.703389|duration_ts=14400|duration=0.160000|bit_rate=384000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=5|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:language=eng -stream|index=2|codec_name=ac3|profile=unknown|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|sample_fmt=fltp|sample_rate=48000|channels=2|channel_layout=stereo|bits_per_sample=0|id=0x35|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3912634060|start_time=43473.711778|duration_ts=14400|duration=0.160000|bit_rate=192000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=5|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:language=es +stream|index=1|codec_name=ac3|profile=unknown|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|sample_fmt=fltp|sample_rate=48000|channels=6|channel_layout=5.1(side)|bits_per_sample=0|initial_padding=0|trailing_padding=0|id=0x34|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3912633305|start_time=43473.703389|duration_ts=14400|duration=0.160000|bit_rate=384000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=5|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:language=eng +stream|index=2|codec_name=ac3|profile=unknown|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|sample_fmt=fltp|sample_rate=48000|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|trailing_padding=0|id=0x35|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3912634060|start_time=43473.711778|duration_ts=14400|duration=0.160000|bit_rate=192000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=5|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:language=es format|filename=mp3ac325-4864-small.ts|nb_streams=3|nb_programs=1|format_name=mpegts|start_time=43473.703389|duration=0.622889|size=512000|bit_rate=6575810|probe_score=50 diff --git a/tests/ref/fate/ts-opus-demux b/tests/ref/fate/ts-opus-demux index ba6059a019..193d94889a 100644 --- a/tests/ref/fate/ts-opus-demux +++ b/tests/ref/fate/ts-opus-demux @@ -1022,5 +1022,5 @@ packet|codec_type=audio|stream_index=0|pts=918000|pts_time=10.200000|dts=918000| |data_hash=CRC32:75113c11 packet|codec_type=audio|stream_index=0|pts=919800|pts_time=10.220000|dts=919800|dts_time=10.220000|duration=1800|duration_time=0.020000|size=759|pos=510984|flags=K_|side_data|side_data_type=MPEGTS Stream ID|id=189 |data_hash=CRC32:59fc266f -stream|index=0|codec_name=opus|profile=unknown|codec_type=audio|codec_tag_string=Opus|codec_tag=0x7375704f|sample_fmt=fltp|sample_rate=48000|channels=8|channel_layout=7.1|bits_per_sample=0|id=0x44|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=919800|duration=10.220000|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=512|extradata_size=29|extradata_hash=CRC32:6d6089a7|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0 +stream|index=0|codec_name=opus|profile=unknown|codec_type=audio|codec_tag_string=Opus|codec_tag=0x7375704f|sample_fmt=fltp|sample_rate=48000|channels=8|channel_layout=7.1|bits_per_sample=0|initial_padding=0|trailing_padding=0|id=0x44|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=919800|duration=10.220000|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=512|extradata_size=29|extradata_hash=CRC32:6d6089a7|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0 format|filename=test-8-7.1.opus-small.ts|nb_streams=1|nb_programs=1|format_name=mpegts|start_time=0.000000|duration=10.220000|size=512000|bit_rate=400782|probe_score=50 From patchwork Thu Sep 1 21:23:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37602 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp545184pzh; Thu, 1 Sep 2022 14:24:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR6gfrLn7QYIHl1r4vv8H0p0u4mtCoA0m2Nmi29I0uIus7bGLpQKyH0HzbvWp0ZAi55DEJTZ X-Received: by 2002:a17:907:6da1:b0:73d:877d:c56c with SMTP id sb33-20020a1709076da100b0073d877dc56cmr25279699ejc.342.1662067466295; Thu, 01 Sep 2022 14:24:26 -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 w2-20020a50fa82000000b004477b656f49si126898edr.455.2022.09.01.14.24.25; Thu, 01 Sep 2022 14:24:26 -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=YRBdUZsm; 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 4CD4A68B98F; Fri, 2 Sep 2022 00:24:22 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2030.outbound.protection.outlook.com [40.92.89.30]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9D09068B054 for ; Fri, 2 Sep 2022 00:24:15 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LBr2aCwhJavWe15i9IL74azgIB//74ePtCYp5Gf5JpFFDo9SRwrXKMqt1ORdi+y+R9LQ9kzirobXDB0WfeAj2j23Z/7qiZqY8v4b8TOsdW89N0dHUlaj82xtIxKM4q10wWw/tb+iJ6zBuDeu3CNQLU4joNE77oMnGTnL20hdlOFHAqNpDnIp+ZPGD5SW39bTRrNH/mHkdwO4vC0VzO94c8qYtDbP7B1wixHcqUeJn6CijJx1LsWI0fJvWQZYNOjB/wmKniU2Jay+vwHVrsjHBo2yl6YhXq60l297gIlfGJT15vFp7YH+iQxXDBUBMMBTVq5I7ZDMtAG18tfcZyyLYg== 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=hX6IFwhKFIdiTwdXOYT6daAYTR32tpaTMu9jwW5A0g0=; b=cyNE1o8RES/K3YfMCT9bp/uc2ZFU0bA4AKluFRiqmGFnrV4lzQ/PAgbQiKSeHH2gkptmFJRB274+7l0589rSEzCl15fE87Z5lOctnOy4p6e4c9r5B5GCwroGqNx3gY2tPM/mqr10YA2oUYG8R/NTsto5jDK0eygSYISEfCHPlTFN0kGkJ1oTkKRChF52tV0OxUNXrGwuIU3HBDo2y5PTiRuVqelTcW1iYTAb5kdi+LaMU3bdK/esGdiz0fN5QC4l76GhsUUealn+fHBqHqC6avfmklYBtaiqC/NLs1U6bomPD9MmB7T2AW9nJ8Go7EaOyeZwok5Z40NVUd2lcQDIow== 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=hX6IFwhKFIdiTwdXOYT6daAYTR32tpaTMu9jwW5A0g0=; b=YRBdUZsmxo+v/vviZ5EinARpzZk0jTzdSeFSkA7Ud6OW8IaewXIf8UXXGsYaNBr8W7e1W3o1cOIkuM5QgsLvCx0vYAs/t4TGuERh4nljgFRykAXMcqJbuzkYzfqnqjqgCIzPOrCllZWX7wW3QZvKw6ehoJW1+YVJ5bSmftGnYyx7SjffRVTW5AO/xR+dSL0TH1Ze49kQVrmq5WZFVi9A3tKIc1lZhLYM6jGBaEOgqKJP7FcNX359uH6SlzKSqltsksbShL+qXJS3x/8hm/Ix6XCJxKvBDYh3qIYqhMTC3nWT+Wo5UosCYL4mgTnUNGm7cPFubyoCrhzosKyuR/KoZw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PAXP250MB0424.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:287::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Thu, 1 Sep 2022 21:24:13 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6%7]) with mapi id 15.20.5588.010; Thu, 1 Sep 2022 21:24:13 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Sep 2022 23:23:57 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [qaR8EPo1jDWJ/4SKYwg4VCYfKGK3I+1a] X-ClientProxiedBy: ZR0P278CA0185.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::18) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220901212403.2622789-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3c8987c7-e1e8-4070-e915-08da8c6050fd X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqZFoN70z2NlsBDiuHIk4Y3YGigiNqkwON5io4DAb0ughBpRpyu/4MYJttCVYTgOWpp/T0vzH7tgY2P1Wqlsp9xfpQzFTOREiE/x5trUW496wJUXnvL+yioDChnnhgMEztiuCCdvnM109z7HcoqGI3gKWm1aprecjjbx45qz99YqkdkLBonNRVQEBbw8ZKZazG8VjQp5ZJgkUpwiTfOwSUw9z+tw7E/xYw63gn/JT2UUF2wc7i166wX8xijMLB0vPxY/qzlk74pNfM/Tkc0asZVEcrrQMZrtCzAz23kyOhcdBXKeqpIwbc8WcLuRZazQEsLBlNQ4VfQ3MBRUbhGWB01VQBRJS355etypecAGLu9yT+03Fze9dUEn5+Vz9K1Az/e7CMQl5IdGkSYgvm8Uwf4mh38k96HVYCbLk4RvkLCWCdYQzmRUy7r3s4rTGLTsOQMf7oQqu0CgQJOAn5qcJwR7ajHNe9mtEdAWSHvTLWYabPGE67NQmy1/ylEMijSp7CcQaiv2dD+X2cJ+ZWYBgDzq3Hf8P6PdgHytQ5pn848qATKmP/GfeOU7T80YfniTxQUgvfYzlOaqFKedECXQ8jF1zbuevEliCPqlc815YueQRj3Ny/D4HEHsVfXRyCJ3oDL7CNG2JVFEjSmSFYg2LEaKLOJasgReZH3gQOdlpGl9J52v3/S6OCPN+WjHtPn1L6vg3l9+V1yGibJW6wtOnC+llTzFfgfLia3TFDg8KAYVKbqBchEUs/a5USJmg4uC6Q= X-MS-TrafficTypeDiagnostic: PAXP250MB0424:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YGZMtyCHTmeAzfVLOwnsBQBp7YjiBvbJYREsz27JsOscrd3xT9LG4bOPa3X2fS9fCtrleGDrOFXeI77d38zZYSMoqDuGxloXPoPs7ciI4RDUTlGbgcf/zPcTFlqYL687MA3HswwV+OWGW5rRl/NdNGzzVd+2h1Q6QFCwUkkH00ppqozNdLn1X1iCWmzgIZFo0+1ctj3mo34Fg0gvNS4dpsmzCMjgDhPbP/RzPrtkbPAJAJsw8RsgucXZUcoyAks+88c0oyE6RhXAb5ig8Byrv/2xR4HtYG8fu8+684BW0oM4S7tB6u8xn/rR022/Hc6DAVQDxm1AvYoD12FhR0cmr0rK3FE1oO0kcRmDF1kmIotrEYv4txUz6U+buKGdio+yPgjxMalrbSRh1SJQnMjpx0U187NJfzoDuQCkvY7lp6X0rAfAFa2/bxYHZNhIDgM6fPPwEiUVX0a9d+pbpTadHiLJWzlEopE/jJCmUhWYzZPAVb2cpBlNHuhFAzPbsTIEiSSStAIbHKJ+rl8hXgEx0L6+Xdz6yfBivYSlLC2ekNifkF1BmnmKp9fRTb0sts9ivVRdiQ0SV9nqNVtsRHjH5qpYQW73atqYxcFGDPIF/wv3L83v8gxcq1Iujf/6ef/rzS29cuMP4gzfnVMkoLODYw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: u/7oI5fX5H1DmKa5EieTPddmq3hpYYVPRwy+ONPC/YCsuPh/TBR2mXgZaSXg7OUAYqolmUb4Lh9aKGx9pSpFRBfoMhrjmf3NT8gOhtl630dvVflQ4B7SMxe/ti0KG54MCLVA/zk6OlxJEsB9YuTR357vPioN6u6yU4afqZgd8u51Thv8GTHSL7uDdXN6XJeo9lCrNJ9Khysykga0YwVUYO+LsvftdvAHHRLCQaxurG3zqAR/d2bwS3gC82oC+25a0lVbrTwDwoH3d9HOcCYrF87H8cf+4oRw9iXKpRUEfaTEhnYc4Gs8BCOEuboOwd/G296hYDjP9vrr6NQqb7Qkemk2OcLstSxo43pBBqvr7KtgfmOknKeaLZyAbXSItOuS8CbtyWTQ1uJHHCKslh66/Cke2Xw6D8jrLEWYzP92KtryxxkDdd2H+d4dPGZV3JlRxbY4MCJE762eUy9Cv4J/ToZbYteumTXtA5gT1KbCurGBQKUiWgoykvwgJKaAJqRRNi+FcNC3htjrXdRJdmgaqSF284C1vjwGjfCk7DM6GH/v876WCUpA4BERM0Lmf0JiRAoBNERAZbZTE5+gWGnqLu6gfNLAjE4HTHZRx8duIwPHm5jtNfu3hCjwxgJ+l+Yl4/OVKAefKg5Qi+WUegs/TWAQ6ibae1GPiHdVddLhvLXhVTVCf8puMIFmv/xTDY3E0OEzwo/mKx/YAmD/G9qlU7gHlLL0JR43U6QtRu68+9phROloP5iqXEF3PuOMXmfJkOpnil5QOpCGmZbXGfp3YpQT/ZrJ/IQAipcNYSJn4VrfB5Ct3e77RodfGMj6Ox1nV9QcF7IznkpxIiaOt26iToBz5MI3NN9wn6YtnCq2SpnZKfXKqAE+AKiCJ2nVkf0PzS/Uu23JmzISW0BygKNOXXtEQ9lXg6vOnbf8c6nXlhYmXSPVVLzOCVdd+e1zwoKlgR0ORO7DMGRNwZ9fael37j+mVujPBZZswJ8o4TJt9RUwkSG+hyeYEp1cE2Btdo0/7pbJKEoe0mmGCsUBZKhVU66rNTOfUX7ZXg7EGcJ95+YRo9gaGhc4mMpff1bywIOH9XKm8gCCUhXWdBXtlfHoc5HrLcE5NwCsXqAHnUEhqDBy84D6ikgDp1MPJCLNVs08/XD46Oc7zuOwoHs7S5/PxiBzzOTSL7Pt0fv7aFSqSQgqhM0yT7bB7dZHtzGleRl1M1vRlAJw0HY0zEQcBdecBQdJw7XMShGG8877qOH+jBL4gkNf4/jg7lAlz7VnLcjgWkO6EyN8xDu45Bqe1+FbVvavaVgoQ9I6WX4tdZj2liQ= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c8987c7-e1e8-4070-e915-08da8c6050fd X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 21:24:13.3818 (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: PAXP250MB0424 Subject: [FFmpeg-devel] [PATCH 2/8] fate/matroska: Add tests for muxing with initial_padding 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: OxmSvsSiUxNd Signed-off-by: Andreas Rheinhardt --- tests/fate/matroska.mak | 19 +++++ tests/ref/fate/matroska-encoding-delay | 85 ++++++++++++++++++++ tests/ref/fate/matroska-ogg-opus-remux | 92 ++++++++++++++++++++++ tests/ref/fate/matroska-opus-remux | 103 +++++++++++++++++++++++++ 4 files changed, 299 insertions(+) create mode 100644 tests/ref/fate/matroska-encoding-delay create mode 100644 tests/ref/fate/matroska-ogg-opus-remux create mode 100644 tests/ref/fate/matroska-opus-remux diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak index b49ec761cf..94532b31dc 100644 --- a/tests/fate/matroska.mak +++ b/tests/fate/matroska.mak @@ -163,6 +163,25 @@ FATE_MATROSKA_FFMPEG_FFPROBE-$(call REMUX, MATROSKA, MPEGTS_DEMUXER AC3_DECODER) += fate-matroska-mpegts-remux fate-matroska-mpegts-remux: CMD = transcode mpegts $(TARGET_SAMPLES)/mpegts/pmtchange.ts matroska "-map 0:2 -map 0:2 -c copy -disposition:a:1 -visual_impaired+hearing_impaired -default_mode infer" "-map 0 -c copy" "-show_entries stream_disposition:stream=index" +# Tests maintaining codec delay while remuxing from Matroska. +# For some reason, ffmpeg shifts the timestamps of the input file +# to make them zero before reaching the muxer while it does not +# for the ogg-opus-remux test. +FATE_MATROSKA_FFMPEG_FFPROBE-$(call REMUX, MATROSKA, OPUS_PARSER OPUS_DECODER) += fate-matroska-opus-remux +fate-matroska-opus-remux: CMD = transcode matroska $(TARGET_SAMPLES)/mkv/codec_delay_opus.mkv matroska "-avoid_negative_ts make_zero -c copy" "-copyts -c copy" "-show_packets -show_entries stream=codec_name,initial_padding -read_intervals %0.05" + +# Tests maintaining codec delay while remuxing from ogg. +FATE_MATROSKA_FFMPEG_FFPROBE-$(call REMUX, MATROSKA, OGG_DEMUXER OPUS_PARSER OPUS_DECODER) += fate-matroska-ogg-opus-remux +fate-matroska-ogg-opus-remux: CMD = transcode ogg $(TARGET_SAMPLES)/ogg/intro-partial.opus matroska "-c copy" "-copyts -c copy" "-show_packets -show_entries stream=codec_name,initial_padding -read_intervals %0.05" + +# This tests reencoding with an audio encoder that adds initial padding. +# The initial padding is currently not maintained. +FATE_MATROSKA_FFMPEG_FFPROBE-$(call REMUX, MATROSKA, MXF_DEMUXER PCM_S16LE_DECODER \ + MP2FIXED_ENCODER ARESAMPLE_FILTER \ + MPEG2VIDEO_DECODER MPEGVIDEO_PARSER \ + EXTRACT_EXTRADATA_BSF) += fate-matroska-encoding-delay +fate-matroska-encoding-delay: CMD = transcode mxf $(TARGET_SAMPLES)/mxf/Sony-00001.mxf matroska "-c:v copy -af aresample -c:a mp2fixed" "-copyts -c copy" "-show_packets -show_entries stream=codec_name,initial_padding -read_intervals %0.05" + FATE_MATROSKA-$(call REMUX, MATROSKA, SUP_DEMUXER) += fate-matroska-pgs-remux fate-matroska-pgs-remux: CMD = transcode sup $(TARGET_SAMPLES)/sub/pgs_sub.sup matroska "-copyts -c:s copy" "-copyts -c:s copy" diff --git a/tests/ref/fate/matroska-encoding-delay b/tests/ref/fate/matroska-encoding-delay new file mode 100644 index 0000000000..fb7909fe29 --- /dev/null +++ b/tests/ref/fate/matroska-encoding-delay @@ -0,0 +1,85 @@ +df0524cac5393212ee103c1d1221f4b3 *tests/data/fate/matroska-encoding-delay.matroska +961215 tests/data/fate/matroska-encoding-delay.matroska +#extradata 0: 22, 0x32ea0490 +#tb 0: 1/1000 +#media_type 0: video +#codec_id 0: mpeg2video +#dimensions 0: 720x608 +#sar 0: 152/135 +#tb 1: 1/1000 +#media_type 1: audio +#codec_id 1: mp2 +#sample_rate 1: 48000 +#channel_layout_name 1: stereo +1, 0, 0, 24, 1152, 0x724077b8 +0, 10, 10, 40, 237628, 0xeff25579, S=1, 40 +1, 24, 24, 24, 1152, 0x80625572 +1, 48, 48, 24, 1152, 0x7d7f4dce +0, 50, 50, 40, 238066, 0xb2265f41 +1, 72, 72, 24, 1152, 0xa6725739 +0, 90, 90, 40, 237723, 0x00d7cd24 +1, 96, 96, 24, 1152, 0xc9e85398 +1, 120, 120, 24, 1152, 0xda1287d3 +0, 130, 130, 40, 238290, 0xbe18b18f +1, 144, 144, 24, 1152, 0x1c9a6102 +[PACKET] +codec_type=audio +stream_index=1 +pts=0 +pts_time=0.000000 +dts=0 +dts_time=0.000000 +duration=24 +duration_time=0.024000 +size=1152 +pos=1232 +flags=K_ +[/PACKET] +[PACKET] +codec_type=video +stream_index=0 +pts=10 +pts_time=0.010000 +dts=10 +dts_time=0.010000 +duration=40 +duration_time=0.040000 +size=237628 +pos=2392 +flags=K_ +[/PACKET] +[PACKET] +codec_type=audio +stream_index=1 +pts=24 +pts_time=0.024000 +dts=24 +dts_time=0.024000 +duration=24 +duration_time=0.024000 +size=1152 +pos=240027 +flags=K_ +[/PACKET] +[PACKET] +codec_type=audio +stream_index=1 +pts=48 +pts_time=0.048000 +dts=48 +dts_time=0.048000 +duration=24 +duration_time=0.024000 +size=1152 +pos=241202 +flags=K_ +[/PACKET] +[STREAM] +codec_name=mpeg2video +[SIDE_DATA] +[/SIDE_DATA] +[/STREAM] +[STREAM] +codec_name=mp2 +initial_padding=0 +[/STREAM] diff --git a/tests/ref/fate/matroska-ogg-opus-remux b/tests/ref/fate/matroska-ogg-opus-remux new file mode 100644 index 0000000000..b69c29df8e --- /dev/null +++ b/tests/ref/fate/matroska-ogg-opus-remux @@ -0,0 +1,92 @@ +605e8e89efb3028e261dd10255c7f59a *tests/data/fate/matroska-ogg-opus-remux.matroska +10207 tests/data/fate/matroska-ogg-opus-remux.matroska +#extradata 0: 19, 0x399c0471 +#tb 0: 1/1000 +#media_type 0: audio +#codec_id 0: opus +#sample_rate 0: 48000 +#channel_layout_name 0: stereo +0, -7, -7, 20, 402, 0x89b1c40f +0, 13, 13, 20, 216, 0x7bf97146 +0, 33, 33, 20, 215, 0x6cb86d8b +0, 53, 53, 20, 218, 0x9cfd691c +0, 73, 73, 20, 218, 0xd7fe6a94 +0, 93, 93, 20, 194, 0x35735de6 +0, 113, 113, 20, 216, 0x3ee6705a +0, 133, 133, 20, 218, 0x67eb6cb1 +0, 153, 153, 20, 218, 0x32d0700d +0, 173, 173, 20, 219, 0xcb7f6c60 +0, 193, 193, 20, 218, 0x9c866b33 +0, 213, 213, 20, 217, 0xfe3e6a53 +0, 233, 233, 20, 218, 0x13586833 +0, 253, 253, 20, 222, 0xbcb2669e +0, 273, 273, 20, 218, 0x8dfc6e33 +0, 293, 293, 20, 217, 0xf5957051 +0, 313, 313, 20, 210, 0xed126e6b +0, 333, 333, 20, 216, 0xbf947249 +0, 353, 353, 20, 203, 0x6c7e680a +0, 373, 373, 20, 209, 0xf78f6af4 +0, 393, 393, 20, 217, 0xd60c684d +0, 413, 413, 20, 218, 0x89056a7a +0, 433, 433, 20, 219, 0x0bc674ad +0, 453, 453, 20, 217, 0xb1d86d1a +0, 473, 473, 20, 220, 0x433d685a +0, 493, 493, 20, 364, 0x0c88be84 +0, 513, 513, 20, 221, 0x804a733d +0, 533, 533, 20, 215, 0x6e9d6e9b +0, 553, 553, 20, 215, 0x63016a83 +0, 573, 573, 20, 218, 0xf9a46fbe +0, 593, 593, 20, 216, 0xa0d66c08 +0, 613, 613, 20, 216, 0xa2ca6d0a +0, 633, 633, 20, 216, 0xf50e6f1d +0, 653, 653, 20, 215, 0x6aaa70b6 +0, 673, 673, 20, 219, 0x7ceb6ba0 +0, 693, 693, 20, 220, 0x398d6ca9 +0, 713, 713, 20, 218, 0x7bd06ed5 +0, 733, 733, 20, 219, 0xe2906c62 +0, 753, 753, 20, 217, 0xcf316ba1 +0, 773, 773, 20, 217, 0x470b6eea +0, 793, 793, 20, 359, 0x36c2a18a, S=1, 10 +[PACKET] +codec_type=audio +stream_index=0 +pts=-7 +pts_time=-0.007000 +dts=-7 +dts_time=-0.007000 +duration=20 +duration_time=0.020000 +size=402 +pos=543 +flags=K_ +[/PACKET] +[PACKET] +codec_type=audio +stream_index=0 +pts=13 +pts_time=0.013000 +dts=13 +dts_time=0.013000 +duration=20 +duration_time=0.020000 +size=216 +pos=956 +flags=K_ +[/PACKET] +[PACKET] +codec_type=audio +stream_index=0 +pts=33 +pts_time=0.033000 +dts=33 +dts_time=0.033000 +duration=20 +duration_time=0.020000 +size=215 +pos=1179 +flags=K_ +[/PACKET] +[STREAM] +codec_name=opus +initial_padding=356 +[/STREAM] diff --git a/tests/ref/fate/matroska-opus-remux b/tests/ref/fate/matroska-opus-remux new file mode 100644 index 0000000000..61afeaa751 --- /dev/null +++ b/tests/ref/fate/matroska-opus-remux @@ -0,0 +1,103 @@ +551e45142f0989b281e837a3a86f0218 *tests/data/fate/matroska-opus-remux.matroska +9355 tests/data/fate/matroska-opus-remux.matroska +#extradata 0: 19, 0x3a04048f +#tb 0: 1/1000 +#media_type 0: audio +#codec_id 0: opus +#sample_rate 0: 48000 +#channel_layout_name 0: mono +0, -7, -7, 20, 320, 0x58b9a88d +0, 14, 14, 20, 159, 0x6c9c4b4c +0, 34, 34, 20, 148, 0x0caf4b5d +0, 54, 54, 20, 139, 0xc5624226 +0, 74, 74, 20, 146, 0x633c4937 +0, 94, 94, 20, 153, 0x3d0b4f93 +0, 114, 114, 20, 158, 0xe5c55641 +0, 134, 134, 20, 156, 0xf2fd50ef +0, 154, 154, 20, 158, 0x93b15410 +0, 174, 174, 20, 157, 0xb6f74f5f +0, 194, 194, 20, 159, 0x9aff4957 +0, 214, 214, 20, 153, 0xfc5f4aba +0, 234, 234, 20, 158, 0x01e44f70 +0, 254, 254, 20, 153, 0x227149cf +0, 274, 274, 20, 155, 0x312f4cf6 +0, 294, 294, 20, 155, 0xafc54bae +0, 314, 314, 20, 151, 0x7b4252b3 +0, 334, 334, 20, 155, 0x29074a75 +0, 354, 354, 20, 149, 0x82c44bcd +0, 374, 374, 20, 150, 0x55c24eb5 +0, 394, 394, 20, 156, 0xf71d4f33 +0, 414, 414, 20, 153, 0x9b6c4ae5 +0, 434, 434, 20, 156, 0x75954e51 +0, 454, 454, 20, 155, 0x28ff4ff3 +0, 474, 474, 20, 153, 0xc4424969 +0, 494, 494, 20, 154, 0xfbf94cc8 +0, 514, 514, 20, 155, 0x52c549af +0, 534, 534, 20, 150, 0x6f1e4b7a +0, 554, 554, 20, 158, 0xabb45566 +0, 574, 574, 20, 157, 0xe61d4a99 +0, 594, 594, 20, 159, 0xf45d4fac +0, 614, 614, 20, 159, 0xcd0553a5 +0, 634, 634, 20, 156, 0xdb244e63 +0, 654, 654, 20, 154, 0x78654c52 +0, 674, 674, 20, 154, 0x9f804cc8 +0, 694, 694, 20, 150, 0x1fdf4c80 +0, 714, 714, 20, 155, 0x1adc4f89 +0, 734, 734, 20, 155, 0x4b53511c +0, 754, 754, 20, 151, 0x8ff2546d +0, 774, 774, 20, 158, 0xb7e34f1b +0, 794, 794, 20, 154, 0x4d98474b +0, 814, 814, 20, 154, 0x14924ea8 +0, 834, 834, 20, 153, 0x8d4752bf +0, 854, 854, 20, 149, 0x74785066 +0, 874, 874, 20, 151, 0x36c94a4c +0, 894, 894, 20, 155, 0x82904f3b +0, 914, 914, 20, 154, 0xd76b4a45 +0, 934, 934, 20, 159, 0x9fec548d +0, 954, 954, 20, 154, 0x9a084dcd +0, 974, 974, 20, 155, 0x90a54ac8 +0, 994, 994, 20, 324, 0x8e34a2f5 +0, 1014, 1014, 20, 268, 0x10f37203, S=1, 10 +[PACKET] +codec_type=audio +stream_index=0 +pts=-7 +pts_time=-0.007000 +dts=-7 +dts_time=-0.007000 +duration=20 +duration_time=0.020000 +size=320 +pos=496 +flags=K_ +[/PACKET] +[PACKET] +codec_type=audio +stream_index=0 +pts=14 +pts_time=0.014000 +dts=14 +dts_time=0.014000 +duration=20 +duration_time=0.020000 +size=159 +pos=823 +flags=K_ +[/PACKET] +[PACKET] +codec_type=audio +stream_index=0 +pts=34 +pts_time=0.034000 +dts=34 +dts_time=0.034000 +duration=20 +duration_time=0.020000 +size=148 +pos=989 +flags=K_ +[/PACKET] +[STREAM] +codec_name=opus +initial_padding=312 +[/STREAM] From patchwork Thu Sep 1 21:23:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37603 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp545276pzh; Thu, 1 Sep 2022 14:24:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR7AJFSYJA/Umfeaf0O/WAWOniQL0FgVB/hqwZVYROPaQy/IvHeIGkFwvkn4RfZlUbuvkJsB X-Received: by 2002:a17:907:7394:b0:73d:cd06:aacd with SMTP id er20-20020a170907739400b0073dcd06aacdmr26111725ejc.180.1662067474953; Thu, 01 Sep 2022 14:24:34 -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 sd2-20020a1709076e0200b0070795e99fe3si184362ejc.984.2022.09.01.14.24.34; Thu, 01 Sep 2022 14:24:34 -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=u52wQ50S; 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 7BBBC68B9B9; Fri, 2 Sep 2022 00:24:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2098.outbound.protection.outlook.com [40.92.89.98]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1AD7768B054 for ; Fri, 2 Sep 2022 00:24:23 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PhPIyMc9tr4guXhq9YZTsMSkFZn+o+kVEPIQZGtxZZhaYGjdJMtK5UDZBiEyhfRxxgZrBA/wsJqz/U7BKzckFxXZyGc6bucgoqHreXPKjX/SQxwalSdRZxWup++eYdmGgjovfhYi+LGqhdYCHCLQgTlIfDhvxWppX9mRlElQLjdtTpjT7xoAymcVMp2SUx42pDbbb6Pb62qVdE347XbbImIOrJYwgswqF7UhTlTrbX+1CyBrCpyu85encGDoUZ5eDzfgHbpUhYT2YWXIK62bEzaGmDijas1PSw5v5M9YiAkOGcQWx4YipSsov9nJ19QmC7lXND66OSAyOmhMoQLtSw== 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=DuAOcusJioHJIEBFWqbCNJge32YFksotZQ9wg8jAuI8=; b=kBG8ZLPG1YY2DE8qLwhqU5kpWpF4hgpQmivupegjBtp0sHuM/XVvn0D+sLb3ZWKlOx+LJtYLiElNLsJ6Cwi6L7UKO9KL/mP2BfC7UUJd1JSyxugd6MaU92q0tuOE8oJXljFTYR8jNsMVbrDSGGdzCpXMoGxWV5xpTmFHpNFHcGjzdLAqw/hOLt5J3caeXQyv8CEGWW46DcCSfYbIbw6d14e87mxnT5GFR6PZw3h3IllzCoAsmSCfGS7uGwseg8cYYbLP7xphUDVnqswqjNWSwmxsddr6lX/mSvL/nbbMfyH5Zdke6giRSc3Uy45tdVym+DtIyGMzOtBGZeLWtPNX8A== 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=DuAOcusJioHJIEBFWqbCNJge32YFksotZQ9wg8jAuI8=; b=u52wQ50SFkpwC5cRtYLJxRG+mGrBK56SLSd7c1BMTwPefijgHkwelkkL7DgubYCllrJlQQN1e4AiuJqXEsH1y6eUpCTdTh1A0Gn9C0QBEGX/567vj7WsY6LPTqAPAZ5Xh/2sUt5AVTaAJ9NgcPMammtnraHk5N5hBYjJm9pktFrINEoLGynK01jBgEMPDtaZX++4WF1xujErQlqNljyPKnve8LbzJ6/acH519TdJEVQJ/ah5SghBK5kGRxKOKkxiFmd4ub+TsNES5LDZRd0pEeCvJ3k/YTxEeZ113SAjssCROaGIHGaNWxfaMb7R0bw6oa2K/g3Xsr0j1OHh8vJ8cQ== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PAXP250MB0424.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:287::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Thu, 1 Sep 2022 21:24:21 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6%7]) with mapi id 15.20.5588.010; Thu, 1 Sep 2022 21:24:21 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Sep 2022 23:23:58 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [0bWMoCk4AAhVbIcr4kTlGrOB4Cz53kSb] X-ClientProxiedBy: ZR0P278CA0185.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::18) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220901212403.2622789-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a580ad20-14d4-4fdb-7e5b-08da8c6055d3 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nBJnOPH7CaP06/PjPoSCFAmMCDuQZAqvU3V7zQcZ9Y5StxYRk5E+LiIYJrUbmXcfMLRQlXXMErHXxZz6/1s+Bq5Oba/Gb98qcS5L7XlyIjnmTA1FUHisZ/qzt9iYjMsaBQqyWWueWQAXZwXviaolPcz2UPVAHaYUgEtY7jIvejscASMpCfRdZeiy8v9ux8Dhvom256omR2n0BdCUwIarME1IMRI3bWIjHOuXNj+MNp9YfQXBB2zAVNMhVBtjofiFkqav5XtxmEaoqEQKAFtwwCEDsh6HQFCZ7fGV29kJdAJ9tAYbbv2KSD1I8aPlWEvZDU8CU0aXESVVQMD1ZussuS/wEBJRwaupCaxcO3vijDnIOHv/qTGKz58EOnyTqkMo/EsczTOPh3ts25dZAxvuqccLJ0A5qaqhaLEtjVikAH8JdzmiKcqZBB47miOwo58lfthFh/hrRE/o99UVcWNFbjEbxbhgGr3fAJEmGwkiPh2dWo/0qEj7kz0DHowxmFwaK3oP21zh73RYKzP3Qt59SrVlk0chatFoHMYeasSPhj1T+PWn+yp+IQl8FOTdVpEv0fkNsCdVUWEK4qiC5nOc0xQaKChmrTrmNFioebftOeRZ6eJq7gm11tkklndke9DwvZOJ5P6t0lM3dDYgjWFgYfrTIFeY0WHkg56NaSY+0t9isGeBjgLuBYuxdbBJkH9GAVdCXTRLp584MqIXvZTU7D5TMghtxAmpMtWztAKYPEYfXUNmvvhQQ2ADzjY1W9eOYVOWxHe3tZieyn8ik4M6vg X-MS-TrafficTypeDiagnostic: PAXP250MB0424:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: muHKrZD0xSF0VuWMKR1X8ZRjn64MLLjVHsHXDo2o1BkFNziLKT9/p9K+pomnfvneSd/XoaW/vvCFGloaBelyQUco3pIdjjP3/q+lQZizspdYweavXuKmwQ+CUp1+En91Lz+g+o3G6j4Wa66r3d+hy2zofsbdTjT2WWYT9LbJo2TRb/33WoQywiftCBWEKMYpKpE70+u4Cd+VTurS0cQMi4NsY0CbnxHyL0TeGnzQITWUxEKy7SZVbbKGAevTIhkUTNOReSA1maFcGf+5yLdN1Q2uf6w081kUdBm4tP2ZxrhQ3B87QxHH/dojp1AZ9LySySkfqv7Tx1c0X1OyiYgbnUyQvwDonHUX3y1XzmhVwqEJzKDDmAQN6ptwwMixCP0Btth0aoe6MkjocrW/K0cGfzYtfnqlxRv985FyMnucypjKMtT7zMmTmXKsY2N8aVp6pUzmIrHjoV4hoHycq7MqW4ywQLRoRIiL3dZ9FHaXT3jp+SKP07UbwMKAAOGYjSjTzy40SYikgfiXsSE6DfGYAByvmo2/0u07efw4Pob8/Vgio2qkr+U0BxZLPxbGsXPIMdca90aaLQJHTyt9FTpsuqA86ZyyGfQuKPfkt17QLn9KZ5BfUiFMmDe+49c2ZQO3FNhjdSY3gCHbabppLfIiYg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: h3R4/8t6R5VGyqpkM3f2M/3NzH4q3gelquR65r39OXWAheWqG3a2YwDT+bKIm6TCoT2A7rGYSQ4woyMoy4hZU+E28FInu/EgGkg9bwU5/TNe3EugOdbHFPTfXLiHdWeTY7uJYf8DPUdJaAXQFcUclXypKQNKKB7iSKyjguyiAaPZWqoYCpG/WVGPizDcwGlYr2+y/SvjjOIdgx/WkqblVXzg2+CJfsUI+TkvQkC+ZpiwbBSjteUw2hYNs/fKzyXqMnDq2Jell0haifnkY2qtgRahK+D/0FI65XEk1azxByVPHwlCVNzY1me2Fr+ev8cl86PvKo1XquLtHkRIJzczqPNnXmJZLAazwOyTYCncaK5izvxqNcJJVj6KMLjDf4zG2EY/Kld3ikbSGsFitvB6WYLYGW0VawUXAExnizC3i4cxr6T5uCnM2Ba4OIhh9aQbVYb+wocagpI3v7Rfdb26arRvym+vV+7MgvdstB0qTyABHCAMRD+4twLqXOMfJO9JPUCCHJiDWc+e1MEqrG8D/3OErNEWvR5tUtTrS3sw5dd4jZzBJskle2/dArKlEn+SOqC77UpN9Cn/qaItJMz/vmL8gP6xkhlYDnDc22To3iyL+JvKIOOKzCDYMpLEe9MbUTRhOvU7BB6D3YN4+oeUURErJGnVdpPQf6O6zgZAhA6hw/jE+Tz9/84Byafzmqdk9g7DIHT20DDSM+DCUgUNIVs3fDj6GlagQEwcV9pQHLJ2QwW3eeDXxA1Zzn7VrITSwtGSQXX2Y2vvfxe7yNpSpCI68vuh3oX4mrzF9q46VGBrPQ50U38oOSL9dioACJb+T9NA7XjLJe147ZWt7Sgt9R96yytzBiekMAjBO14sbvivpZQ70EVVniWJYbTC0Oocfi2dcLADO65a0w8soZDXupQB5AmELpefCqc9468mYeJysjYe8aNVQlMn7O3afDFoI1wNy7JpjXQ0T/ZmhggSij/8kukhCnQDYN6fxtIRvYQlT+MVkriD21USkTnzBq5hp9fliYmJn+ybPgvEj86wUKvSUlqgtnS2aOvMA65CHsQURDY+sMPQE+a+SGvsAQy0gkvG853R27+Q0QsvaE1o+wYW3f1Bo0vIL+X2L/+nLKwiQwv0FfJCgq6EGMl049yCE+VHmeJBlrHVcRYbX+aBXdC742xpvq8V1a9llS+EHmdYmE1k6sh7YZIK2uSRBQhxKcaF1WpjEnie5CAQ4ZTawSdgWqF62d09RbI9MVT3KHQHwP5BvvcRiyYZifDNJUL5mgkdcEstF+iJb0phlhSleoz36wqqdJ14AkicCIeEgac= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a580ad20-14d4-4fdb-7e5b-08da8c6055d3 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 21:24:21.3518 (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: PAXP250MB0424 Subject: [FFmpeg-devel] [PATCH 3/8] avformat/matroskaenc: Only write DiscardPadding if nonzero 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: luXA1ImbCHj0 It is possible for the trailing padding to be zero, namely e.g. if the AV_PKT_DATA_SKIP_SAMPLES side data is used for leading padding. Matroska supports this (use a negative DiscardPadding), but players do not; at least Firefox refuses to play such a file. So for now only write DiscardPadding if it is trailing padding and nonzero. The fate-matroska-ogg-opus-remux was affected by this. (I wish CodecDelay would not exist and DiscardPadding would be used to instead trim the codec delay away (with the Block timestamp corresponding to the time at which the actually output audio is output).) Signed-off-by: Andreas Rheinhardt --- libavformat/matroskaenc.c | 12 +++++++----- tests/ref/fate/matroska-ogg-opus-remux | 10 +++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 1256bdfe36..de6c993e6a 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -2591,7 +2591,6 @@ static int mkv_write_block(void *logctx, MatroskaMuxContext *mkv, uint8_t *side_data; size_t side_data_size; uint64_t additional_id; - int64_t discard_padding = 0; unsigned track_number = track->track_num; EBML_WRITER(9); @@ -2619,10 +2618,13 @@ static int mkv_write_block(void *logctx, MatroskaMuxContext *mkv, AV_PKT_DATA_SKIP_SAMPLES, &side_data_size); if (side_data && side_data_size >= 10) { - discard_padding = av_rescale_q(AV_RL32(side_data + 4), - (AVRational){1, par->sample_rate}, - (AVRational){1, 1000000000}); - ebml_writer_add_sint(&writer, MATROSKA_ID_DISCARDPADDING, discard_padding); + int64_t discard_padding = AV_RL32(side_data + 4); + if (discard_padding) { + discard_padding = av_rescale_q(discard_padding, + (AVRational){1, par->sample_rate}, + (AVRational){1, 1000000000}); + ebml_writer_add_sint(&writer, MATROSKA_ID_DISCARDPADDING, discard_padding); + } } side_data = av_packet_get_side_data(pkt, diff --git a/tests/ref/fate/matroska-ogg-opus-remux b/tests/ref/fate/matroska-ogg-opus-remux index b69c29df8e..1fa776ef01 100644 --- a/tests/ref/fate/matroska-ogg-opus-remux +++ b/tests/ref/fate/matroska-ogg-opus-remux @@ -1,5 +1,5 @@ -605e8e89efb3028e261dd10255c7f59a *tests/data/fate/matroska-ogg-opus-remux.matroska -10207 tests/data/fate/matroska-ogg-opus-remux.matroska +a3f98769fe55bc5234cf75fb1949749a *tests/data/fate/matroska-ogg-opus-remux.matroska +10200 tests/data/fate/matroska-ogg-opus-remux.matroska #extradata 0: 19, 0x399c0471 #tb 0: 1/1000 #media_type 0: audio @@ -57,7 +57,7 @@ dts_time=-0.007000 duration=20 duration_time=0.020000 size=402 -pos=543 +pos=540 flags=K_ [/PACKET] [PACKET] @@ -70,7 +70,7 @@ dts_time=0.013000 duration=20 duration_time=0.020000 size=216 -pos=956 +pos=949 flags=K_ [/PACKET] [PACKET] @@ -83,7 +83,7 @@ dts_time=0.033000 duration=20 duration_time=0.020000 size=215 -pos=1179 +pos=1172 flags=K_ [/PACKET] [STREAM] From patchwork Thu Sep 1 21:23:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37604 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp545336pzh; Thu, 1 Sep 2022 14:24:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR5WmllXayAhPkEn6wcz4gzg76Fozsq5DGYuUo6dUVL92q2Q7A69Z9BAxyEEq1Sw8XnjFrwR X-Received: by 2002:a05:6402:1e8d:b0:441:58db:b6a2 with SMTP id f13-20020a0564021e8d00b0044158dbb6a2mr29711289edf.277.1662067483537; Thu, 01 Sep 2022 14:24:43 -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 o21-20020a170906975500b0073d6e0416f9si288857ejy.671.2022.09.01.14.24.43; Thu, 01 Sep 2022 14:24:43 -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=BqmM59so; 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 8DF1268B9DC; Fri, 2 Sep 2022 00:24:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2098.outbound.protection.outlook.com [40.92.89.98]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3D00A68B83C for ; Fri, 2 Sep 2022 00:24:28 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HGQudbIwgnevxBLwiQVUhNL3Yx20HVPdAOG+LiNwcuhzTEnHs2DE7HNJahZEabTLKjtBvIEPqjufHaP677Y0TPZ2wKXdVtUr1fvLXrWADmhsNcWZe1kTBhwUgUZMoEdPHh5bVgNMYbzI+hkPiYmDyxxhCp2r2g6IdADtsZpGk+JaSMswhuu3/yjMePqLvwkvdNwrXGsqn26ukRkjfvlbhI/Wxu3x4wCtovnSZIqUqTNDi9AScWU/i4EbexdGnJWiWzcxAojH0Gbj8IsawmqlCnomyr9nw+9cSqxo39RECVC6dPQhzBf+GFhfqJp9GnmVRGM7BzE5rMu4h05kXwiz3w== 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=WU0lgdWozunmDHwV9uQd5xu9EfBemSB4FIC0HPKKNgY=; b=CrkTZvpxhiZWvG+Pgg2nUCXm28QF0zcVMxabpDVjWFRqk90Fp89LLNh7ocUFjjckDqGLziuZ3Zld2/ChnR9p0SRhYteuYlCRyyUmQNbFn1OmJa5RSdFVxJVl4jrd8RiGltYZG5gUCaU1DyGuPCXlwLGB7Bwrgh54vLBIP91IkRdpmL8oK5W/2cZ2PSxxKQa7pVRT1ouNQW4IrM64tJ9Fl7vIZZ5jebUP+E1SHerOJQMWcNlKTMMQSLBWdhAiTMUi48z8GMXaj5brzuCC8S3ceO78ER8Xl++MjPoBlnM2376pau5LS9Ak8mx/ux0l8HhET5f7Jv2C/lbdOlDIeFSFXw== 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=WU0lgdWozunmDHwV9uQd5xu9EfBemSB4FIC0HPKKNgY=; b=BqmM59soOLiZqUiMlvtqcfm94su578GVbEtODU/jnQBMfsDzQd3agRVhmigjKDJd+Iy7CS7vWuwlPVfyO/zb4aZPNkeg2pwTDnZGv8wF8r3iLXfuclRae59b0IMnRPDJFqaTxd8aYYav9XOy0pnqbrNYfatUYNDiAL9ijyc2+YNfTXU59G7wiqzHdDkL5TdlyJXMRFuU77WXYiccoPLATYYjqZN7+sHb/WcAulN6OhIaMQUNrLPtsK4u3flWWGy9CA7W7VVDrBe1CqMegvxllxuBo6eWPXS6BL6PyZr/Yls7PONjunjjo82S8GQTbl+y2PZcdqPiIXmRBAiP9JQ5GQ== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PAXP250MB0424.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:287::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Thu, 1 Sep 2022 21:24:23 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6%7]) with mapi id 15.20.5588.010; Thu, 1 Sep 2022 21:24:23 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Sep 2022 23:23:59 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [PXHJ687aUCivrgFoNoiUaSoXnl6nYKpE] X-ClientProxiedBy: ZR0P278CA0185.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::18) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220901212403.2622789-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dd315191-5a47-4d51-938e-08da8c605721 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nBJnOPH7CaP06/PjPoSCFAf0glQwCTtofE5CDU0+fNaScj5p5aA9cB/gw007cIqNOnDdCs+AFoO7bD8BYhsASoAmIUu3kQkjA+KlXoqGHqBBuGZQKx04MOohcAt6p01+zplrXi+ZmEfelKFRlMxO2Sw6ZTH0lqx98RfLS7SUQ777zN8tRbar4qE3VHdRPNlcXmvOFJ0O4DFL4FRnE4h6xMf4mvxRR3kWZtpZ4X17NSrZZen/Ee2KlNfvDE7fQRj+P/Iuhov2vadoVnxSCcdD6PYWlnlHquhGDcpk231p1J6fvXhPKff65MBeQBpsTsQkbfn+yZdWGw7/dRDH6XdTnMcGVpfUgSgosX2Xr92fOTyH8ovxutalyltKPGyTqs1biyVIUaahbniGebehjHzMRMG79p+Sx0gVv4KQY2ktfmm3JaZW13yA4fD4HnRtcfrPqxWLkwd55sZfbI4dpBlT7CplvAUPPycSF1aTRmM/GGdHPWMYUjOt7KmpnH8jHkj+WZLsYhVttbzqWyLxKg/dv10qi5ZF92ypGk07lNZTPcX+7skX5VjLAA42vtbztCMvnn9ZTNOcPhGsq4XDMjgJazB3a5++/X4M8Dj1iE0zcFuLUzpNAgX+N2MLcNngVfEW53b3FoC9nlh0HFEKZ7tCRnTziFAXLkmPLB95wed8WwFv8bLrjqB/QIoF32uf70iXzSgUVIDiXfzRXXG8YFuNhUGddpO2/dq4xg/fKCYXGK3Nfq3e8itdfOcZNuaVrvCl4ccmkW/RBGnt0Rb2w72Joj X-MS-TrafficTypeDiagnostic: PAXP250MB0424:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yt5i8m6kQXZm4VM2EI4QMO25zTD//746W5iQE35uxbYKuSWRe7HUtxw9beNHxx+0N6YAVxnTOForruCclmthgAYitBVjQkTh9UAfye83IbsjupMa68h56CxxHTiwnxjoMRSk4Rnrxz6SZ0q/tOtGZuWLHXT7M2OByYc7KlFrzWcKEW+p7Z8qOISiLx0VPmHxsaULDpsbYhxRbUXSJ9atXyQRmADjJ9XGhhZ3xFio3jSjvixLPmN2qOYwkdAC1kxOpOnX0xWNK0EIoAwqIaaFgjvMjYpT9RJmOc1tPT0R6KleF95LXuGCt+Q36joEe/tnL5Dz4lvBGCoGVoPkoHKX2sgxzJbrVwzDn8bhxTl4E9x4pi9y/heVOE4uT2K5LkFKCEr0mizRqVPjavd22rMCewELMO3tt9rl+2rf05DPzLLRCKkllLC9MIb7HgaHb/EKgtxxLqZyXgROaMOMhNng9a2ddKwC+UbZmMU+rHO4RmHJkBh4R80/H/2cSWdE/iMpCj5i87UOFSr9/gD1q3u9GOlensEny4F9xNYPmrUEaPY0De+xA/lqF8JXAgMUHhIbu+f6bT42zGV3tlFrtJTsGG03GaNmM87hnpSJxOmaQtGTTeyfYShlMmQPOa7hpIrPLDP0KtisIxWh9f4OuBMmMA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tgxZaMh4VwP1L3mbgNkJEFSe5yqLCx+2t37QvXQknQ6qUNK4ZGQRWgsBznp3zW0TVfxFtYAaKUlLCk5Ij9HvEG0FOohi8SUT+aSCuG+Jn19WSeL+LXrunU30Dbzurk6Zmsb8UhnUEkgmcPj/1OPxRI+JdfPuuh9BwDQL+rg1/MwZpkIepWM36EMhKiygnkJyyvfw4RcQxSwKEFKQY3qrJEIzlKr53fkWd4ivw6or7pBhtZtbyNHoamBUdL/OxhVCjbU8xmwVIZ/2o+9pnwJn7xY250d7UgtQWhztdVHckhhCbd31ZxYywb//w1N1hAWGJ1oV2fVI0Lz7QB+jRSRat5L0bovmqiPrw8XFKccbjjlMvymtH8Qin/61OVDuiDNC07sik9o1aFz4dopoC9UvpM9mzEz06mhvfIXbMqqccUMPWEMqqMtlLPuqCH76a4Z2AR4cZVCojT2RLML9M/7FL35dshoYgffxC9YuZuLN7s8f3fw5f2V4LJk/ajGJNnVve/EZUSJhDnFVFAChMJLIpC9UG6DjK0Bb2lR1tpom+9ulFe0MCCY9N2v1GAy2jF+qMJIlfkP1fMtCjmnX4wwi7wGatCUWpeTSu3XLnzmU20MNSpq7QhA2ItExA0UH5d+OEWbILfIU5Wl62k/nZcRRt7ujl1iFfNkH5xC++ilHy1EWJg6s4JOft+koCWbqxcKM21y2ELgNKhZCaBKIm0D2TRIjDPzzhrWyYFsQYrTVcNUzejJP4hBW+1+XQkYirOi09VBn129RdSvU+AGqX+qdfiezf2wp9ELYhr3OPz0gbAfxsk9aGYwi7zQLBx0kFo3lRtclWqGIe7VAu477qLdFd856uJ8s8e0/ItKGAKNLqFGXwbs5a3Rb7NI9Y9DUB88mKEqQTydbBp4iYbF6fmC/DWdlEkN/POuMB/7gYrBKwTCesrzK/k7/GY8AOMtzfpQgjJOMtFpdlMgAqV/tJMoi9USeohroFONf4EptGsazOfvGF1FByhC7XcXazzp3ntXSRv0O2BqRXHwqaIhlMyODBtQfO3APBRXxHS5XxfNDyPSwZhShsCTyFxMhJ6VVZf4lHeYewfUpqJ5rV36mKuZXRVwGDbz18wnmMti0LmvLOkGGOQ8dYw9FMKAkfw1g2PR2MB8/KBFnBLEEchQRTP3Gv3nnEc0vRh9Uh1FjgnMZxxkkbUQxlXICdrU0dE+NGRsqt/BJvYxRgf1g56YVMegwtq9JEknGp/AU6XlSUXoopHVET9lPeDf59B0pKX/ZxrG49fw5/WA/7+udOJuBgMImtIB2J2O0tu1m2nUh5b+mj1Y= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd315191-5a47-4d51-938e-08da8c605721 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 21:24:23.4944 (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: PAXP250MB0424 Subject: [FFmpeg-devel] [PATCH 4/8] avformat/matroskaenc: Don't override samplerate for CodecDelay 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: XJZb+tc65VEI Opus can be decoded to multiple samplerates (namely 48kHz, 24KHz, 16Khz, 12 KHz and 8Khz); libopus as well as our encoder wrapper support these sample rates. The OpusHead contains a field for this original samplerate. Yet the pre-skip (and the granule-position in the Ogg-Opus mapping in general) are always in the 48KHz clock, irrespective of the original sample rate. Before commit c3c22bee6362737cf290929b7f31df9fb88da983, our libopus encoder was buggy: It did not account for the fact that the pre-skip field is always according to a 48kHz clock and wrote a too small value in case one uses the encoder with a sample rate other than 48kHz; this discrepancy between CodecDelay and OpusHead led to Firefox rejecting such streams. In order to account for that, said commit made the muxer always use 48kHz instead of the actual sample rate to convert the initial_padding (in samples in the stream's sample rate) to ns. This meant that both fields are now off by the same factor, so Firefox was happy. Then commit f4bdeddc3cab807e43e0450744dfe9a45661e1d7 fixed the issue in libopusenc; so the OpusHead is correct, but the CodecDelay is still off*. This commit fixes this by effectively reverting c3c22bee6362737cf290929b7f31df9fb88da983. *: Firefox seems to no longer abort when CodecDelay and OpusHead are off. Signed-off-by: Andreas Rheinhardt --- Non-48kHz Opus is also weird in the demuxer: avformat_find_stream_info() sets the samplerate to 48kHz. Therefore 49b0246635 calculated initial_padding based upon 48kHz for Opus, regardless of the actual sample rate indicated in the TrackEntry. This is wrong if avformat_find_stream_info() is not used. I think a better (but still hacky) solution would be to just report the sample rate as 48kHz for Opus regardless of what the header says. (Trying to pass initial padding through the decoder is problematic: The corresponding field of AVCodecContext is unused for decoding, instead there is a delay field which is always set by libavcodec whose semantics are unclear (there are two inconsistent definitions: "Number of frames delay in addition to what a standard decoder as specified in the spec would produce." and "the number of samples the decoder needs to output before the decoder's output is valid". The Opus decoders and parser are the only components that set delay at all (based upon OpusHead). When converting AVCodecParameters->AVCodecContext, initial_padding is mapped to both delay and initial_padding; in the other direction, initial_padding is taken from initial_padding (which is encoder-only). If one wants to pass this value through the decoder, then the best way to do so is probably to use initial_padding for decoding, too, and let the user set it and let lavc update it if the decoder encounters information about this in the bitstream/extradata. This includes that lavc updates initial_padding if it changes the sample rate (as it does for Opus). This would also fix delay (the second definition would be deprecated).) libavformat/matroskaenc.c | 2 +- libavformat/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index de6c993e6a..c525edb39f 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1830,7 +1830,7 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv, case AVMEDIA_TYPE_AUDIO: if (par->initial_padding && par->codec_id == AV_CODEC_ID_OPUS) { int64_t codecdelay = av_rescale_q(par->initial_padding, - (AVRational){ 1, 48000 }, + (AVRational){ 1, par->sample_rate }, (AVRational){ 1, 1000000000 }); if (codecdelay < 0) { av_log(s, AV_LOG_ERROR, "Initial padding is invalid\n"); diff --git a/libavformat/version.h b/libavformat/version.h index 7b414039ad..a54ffd6c0e 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,7 +32,7 @@ #include "version_major.h" #define LIBAVFORMAT_VERSION_MINOR 30 -#define LIBAVFORMAT_VERSION_MICRO 100 +#define LIBAVFORMAT_VERSION_MICRO 101 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ From patchwork Thu Sep 1 21:24:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37605 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp545394pzh; Thu, 1 Sep 2022 14:24:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR4RamOL9Rm+mcEs/mh0eXAn3EkQc6FuDa1sy0lQPGQ/GO6bJfo0/ZBvynSh5t0ScvX6ExsN X-Received: by 2002:a17:907:d08:b0:72f:b107:c07a with SMTP id gn8-20020a1709070d0800b0072fb107c07amr25244173ejc.340.1662067492440; Thu, 01 Sep 2022 14:24:52 -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 y16-20020a056402441000b004464a7ae588si201942eda.411.2022.09.01.14.24.52; Thu, 01 Sep 2022 14:24:52 -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=rMouJdvi; 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 ADFC468B9DA; Fri, 2 Sep 2022 00:24:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2098.outbound.protection.outlook.com [40.92.89.98]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5E91568B99E for ; Fri, 2 Sep 2022 00:24:33 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hd/j9c9OYOP5InfRlwSz1fd2xYh9Lnv4E7tKsRZfyoVa2yP7pQgGchR7XnvIHLK8DYulyxKkfxuCZn98NX6x/9PwJ3YWOq/aAmWXOvP682zhPhfKAEW4gyuZTGC6aXYX3+GAL6EYax2JaZvWpMrYBjDM99q7BFL8vcnIIGEJirwcYuYqRAmE0qxZwvfSA8EZ/zSiziqRRPgqcstORgs3Jeut5YTLc42dSW20mBbBQacP7SdDUFh8Ga3HHD8xbazdBuWc0MgI6ncOJWff9iiPRPpNiGl/rp24q0rPgxMQK+T3HjMnJJw95zqWNGIgLnoHjvoUy8x/ep0pt/1zXQg//Q== 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=pjklYjsUJ9+BnRv5U1NtztTJ7jBU9PdO+r8V61zIGZ0=; b=AG/PI7Tu0VATnZf+HQYr98HUmBtFfDHRFsC7RqY8W9+Q6xCpfepD1G/6kMf9FYsYG5yWEsnCC+Z/tgksqAVbfWilVP11pF/bXlbpjFBNeH9BN6BBDQirJ2Ka3vv+mSe3quraGxwfZ/2OG9Pmd5ohgRv7HOZYz2JVVzT/zhShLXvwc/OY/oyUVe82OZpbQ/kDQQtADaCMle6VhH8AD0+A3ox0odgxJRecxYNPosucZQfRs1pneEXF27U3Uf7tjKj4s/VTH8E9PwydDsIymiZG1xSAS8ZOOdbeHaOkFdhToZpgbsIMpI2wfLRazuzgBvj7Wd9vhTegjm30IsPLyhG+yQ== 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=pjklYjsUJ9+BnRv5U1NtztTJ7jBU9PdO+r8V61zIGZ0=; b=rMouJdvicDcC+wKuLDAAjbpHq+eqpugcbMUd7s6GqOFRedtWGSReezuDtkUwWtvz3YfgQKVkj5Y89JEJdjlv8fniQlBTdqn2s/Min2aVEuHTj2Wsy3m3kwYALH8TPeGjLRc1VhZL3fkKs3yzAYYTQOrigvNqKV8Q/3LkDAiSAGWDYCHJcA4k68RYNsv2MqMGUeog5xEId+w+XyRQPhjScc26wvqfF7iuUAPHNb9J7orbIPDAKgauphFx376vWtmdiguELgVAbOvmnABE7auI3AKGh3p8vFAyPipTzb5ZXjbNtkkykVPrN39BV6+jbd+2KEoq3jVx98MCCigJGw1doA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PAXP250MB0424.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:287::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Thu, 1 Sep 2022 21:24:26 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6%7]) with mapi id 15.20.5588.010; Thu, 1 Sep 2022 21:24:26 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Sep 2022 23:24:00 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [HaPnPSeH9NiJs+O+yVsNiLBcPKH4wC5y] X-ClientProxiedBy: ZR0P278CA0185.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::18) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220901212403.2622789-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3eb9763a-b906-4b5a-9674-08da8c605918 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqZFoN70z2NlsBDiuHIk4Y3EC+DMXnKi0YWD3tAauc7clq0gFDwawm5jfWmjXFu4zwdRotOp/y5yADbh9wG2v9TpeY9lNrXI07aH7V97NxdoBXLoYIrB+wEGuMxn00k2imoXPMwOyM952y5muVYW/UHiVD1ppdayMG8iwiC6px6qOI9RyiYobgp0d/NsXkk1BJRGtRW73EH4hAaUCo7Q1wSWjN19XzemJ+BO3puxbaEwKohrSmzzOikesiljHY4+wULJrcgr2XMSTF7HNQwu8yIv1tM7UDjFJKq+lJAVMQw1jHJk93TO5moBjS3BhoNSqxS/0wisUkhSRK/VBpWZXD+ao4xTtaIW3tswxIdg2/e5/BzalZED3Vg7eKgsBhR1nOo6VzHYNvp4/lyiE4PXnlHfdIZr16uTFR0wV1J/LSgf79k3lvLOIBUIAxGzPkQeojkK6250soCLZS+xGrhTz1ALBJsG9Op2X+0tFcUO/HcNHBBdSMC0AuOTK8Xxxfw24xwLEOP9xQAOH6CtICBs4+lIhlV1KYgvFPLsGINoGPWYRYbjZ5wV1mOa+phVN/vbAUjk09yapG0Nk/+Q/U3NbUpjBM9NfGgKIx9/anSUC5htwTcvUE0B8mqzYAOYcY2+TiRVPVOzalhGLWoDiyMOdkxci1Kf0Ck9iWEMphogdaM168pc+i3gZOnphMKc5sLtvpiZohF52FoLbRr5IK8LCTd/zUWjNGjv9MF7YhC6rRTS8AjavsrU0ePuFE3AGCc7Qc= X-MS-TrafficTypeDiagnostic: PAXP250MB0424:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YmriieBv/fm8W6WYhBeqRCWB9runUGTfcp37nAeqAlMr6vgaCGa07720i5v/hGrBpeVFFx8l5VBuEgFJ0ojakYe7FFkE9LW+gBQgaXkZkayIUtgoxFgDO9c9GbpB7zpmZtF4Suo5BMj1VWi1zR9xrc5cTtMiL/eN27OVpn2IPzZku4sBktBSf+vGekt+2OdZ0v1OGO95OSz/yyYyuBahoZDL7ncphiPhKH6UTIVw+zHMYtrUTFciFF39vbsYoQw1GH43Q1s5HM0nWqgmJKwYUHjOR9tPQnrCEHEnp8EBkU5R/eBAuY+X4Cn9yrVii4wecnxPXmQ90JYkyW5/w0HaeCm1AY+2/pGq0y4SHkFpLdJa4xJrrDx7a1dZEr+EAQ1leJo7fIjKggwqDkeP+xWr174uYZyowA9/QhyeyvBpZS0Td6etVf24XWJVVljxa/0IgvGJmZ+yyNZXEb7YMy3wl+W5Xor155oLEwI8pkx4jUeu9eAtVU1oYgIWyWbGBkKJ2fj/nET08uEfbeNevp+D32yA+7QVEHneulzCUHx3njD9oArkd2aiUBa1rqc25IGVi3mDepgYelLndOLb3zc+H7zJleZiRAnEOVlOgJUJeQSYgCiPFUacSBDEBBKjV7kjDrdI2+FW2v+O2hbG/loqow== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: X9Q50ZDEXJ1f8H7AimVfHh+yynBENIw6qnkW7CrsMmuQlUWN1FgpKuqp5EQSYWDV4gIbHuw1Emlya8YtP9bK5lKA6QRPQVXvozsOjOhnTCDJ2LSudiMZE3XPUxb5DPVCG0Gz5ITgC1S7qS3u1cTzJnKBB6lU2JaRi8Ji4S3X2hb1w/syLU5yhn8OjwHIF1vCs+wS3m4sO+6rHj3xXOinXEJnBm1VJsdGDTA+CN7TtRS4mPOObZvrik4YbioRA5P/FzKB6nJgELXCyKAhfxqBHZ3ydF4UAR3b5ozklFippNphFihhr4UQn8/6cpjYRcGYt2K5wErlkTZrcx5izKueIJpVyI9jzIQdaQrNFVpSYiW2KcsvDLvmOMRNQc3BmQH22A6bC3x7FjL0FknhX9hcKeWRxgwbz3csHoZuqgHjUnC0b1sgTl4X52Tr9bScyFsT/ab9lEPKUPkny2qiRURu5zdxQ6qNbLAvUYxNzXYcWDbK40Ch1uDd0R2H2QnfDSDpGSDTAR/BnFF9dGS/iOb3tmZ57Ax+sDd9NYeMsfjilqPovGwihBb+xJJ0USS1vIF9liwyrsWb4psv9zH4XQKT9sDyhnZSAd3VrbVF8vev7Zu0yYvk/14w7kkslLTn3Ptx9OzDMHAOl8b4T+MHeKeftT5b86FgKQ/bDHNH1A+v1A0z89iufHsaKxElxSyy2DuQPZYAxJFE7SmjZPiZUDUZb6RotgsHp8J5QjfzKULzJaBVP15anJWUOhVpTxdHfeujtolBLYQHFUPl2Kvupjq6TFiDoG+mXr5uB0Rofwf59TAgFRT1IAb79w4y+2CcOJNCp6RDJc5fo2/o1hiTMQ5m6DioYcj5D8/xc4v0DBg4QbgYVhIr0yqufZ4yd4yGAXyJeY1HqXsf5OOSoW2yE8riF9AVsKGkuJwoHNkkdu9TPFpj2TMnYh+GQ3zxlNJRoqjOmP5sFmiUkNZ2beXKV2H36l0fLAayO6Su1KChl61zFKAWTXI9apVFDpc2XMEv+pzDCwfvz0np8k46oPTwcSThliL66r1L5Tr3t8l7gs9pL7dxqdIF/+kGmXdu0AvVFrQofGMDijaQGoqYLc8hWmpwwK0G7eFrD4FMYQSfn++9UnCU0mz1gsrclwRLdYpm5fkuqDBAKpwpylMQGzButh7hlmm9PqmygNxYJ06sbzWzW1WPKpgJ0oBw2EtzD1OEoOD8qzcRPcS/5EIrcJPYQhibeOYP/+OEBqx8LBuqpwkf+DucYIOldWIbfMA7iGyDL5dSImtY66xOpa/ccIjIXnDrpgLNYHC8/gQunbvQp3wP5c8= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3eb9763a-b906-4b5a-9674-08da8c605918 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 21:24:26.8077 (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: PAXP250MB0424 Subject: [FFmpeg-devel] [PATCH 5/8] avformat/matroskaenc: Actually apply timestamp offset for Opus 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: 1M982f8AWIFZ Matroska generally requires timestamps to be nonnegative, but there is an exception: Data that corresponds to encoder delay and is not supposed to be output anyway can have a negative timestamp. This is achieved by using the CodecDelay header field: The demuxer has to subtract this value from the raw (nonnegative) timestamps of the corresponding track. Therefore the muxer has to add this value first to write this raw timestamp. Support for writing CodecDelay has been added in FFmpeg commit d92b1b1babe69268971863649c225e1747358a74 and in Libav commit a1aa37dd0b96710d4a17718198a3f56aea2040c1. The former simply wrote the header field and did not apply any timestamp offsets, leading to desynchronisation (if one uses multiple tracks). The latter applied it at two places, but not at the one where it actually matters, namely in mkv_write_block(), leading to the same desynchronisation as with the former commit. It furthermore used the wrong stream timebase to convert the delay to the stream's timebase, as the conversion used the timebase from before avpriv_set_pts_info(). When the latter was merged in 82e4f39883932c1b1e5c7792a1be12dec6ab603d, it was only done in a deactivated state that still did not offset the timestamps when muxing due to "assertion failures and av sync errors". a1aa37dd0b96710d4a17718198a3f56aea2040c1 made it definitely more likely to run into assertion failures (namely if the relative block timestamp doesn't fit into an int16_t). Yet all of the above issues have been fixed (in commits 962d63157322466a9a82f9f9d84c1b6f1b582f65, 5d3953a5dcfd5f71391b7f34908517eb6f7e5146 and 4ebeab15b037a21f195696cef1f7522daf42f3ee. This commit therefore enables applying CodecDelay, fixing ticket #7182. There is just one slight regression from this: If one has input with encoder delay where the first timestamp is negative, but the pts of the part of the data that is actually intended to be output is nonnegative, then the timestamps will currently by default be shifted to make them nonnegative before they reach the muxer; the muxer will then ensure that the shifted timestamps are retained. Before this commit, the muxer did not ensure this; instead the timestamps that the demuxer will output were shifted and if the first timestamp of the actually intended output was zero before shifting, then this unintentional shift just cancels the shift performed before the packet reached the muxer. (But notice that this only applies if all the tracks use the same CodecDelay, or the relative sync between tracks will be impaired.) This happens in the matroska-opus-remux and matroska-ogg-opus-remux FATE tests. Future commits will forward the information that the Matroska muxer has a limited capability to handle negative timestamps so that the shifting in libavformat can take advantage of it. Signed-off-by: Andreas Rheinhardt --- libavformat/matroskaenc.c | 8 +- tests/ref/fate/matroska-ogg-opus-remux | 108 ++++++++++---------- tests/ref/fate/matroska-opus-remux | 130 ++++++++++++------------- 3 files changed, 123 insertions(+), 123 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index c525edb39f..0ded53dc21 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1836,11 +1836,11 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv, av_log(s, AV_LOG_ERROR, "Initial padding is invalid\n"); return AVERROR(EINVAL); } -// track->ts_offset = av_rescale_q(par->initial_padding, -// (AVRational){ 1, par->sample_rate }, -// st->time_base); - put_ebml_uint(pb, MATROSKA_ID_CODECDELAY, codecdelay); + + track->ts_offset = av_rescale_q(par->initial_padding, + (AVRational){ 1, par->sample_rate }, + st->time_base); } if (par->codec_id == AV_CODEC_ID_OPUS) put_ebml_uint(pb, MATROSKA_ID_SEEKPREROLL, OPUS_SEEK_PREROLL); diff --git a/tests/ref/fate/matroska-ogg-opus-remux b/tests/ref/fate/matroska-ogg-opus-remux index 1fa776ef01..da9c8d285b 100644 --- a/tests/ref/fate/matroska-ogg-opus-remux +++ b/tests/ref/fate/matroska-ogg-opus-remux @@ -1,4 +1,4 @@ -a3f98769fe55bc5234cf75fb1949749a *tests/data/fate/matroska-ogg-opus-remux.matroska +47b6b69c2ffdf5729557e90c72d241e9 *tests/data/fate/matroska-ogg-opus-remux.matroska 10200 tests/data/fate/matroska-ogg-opus-remux.matroska #extradata 0: 19, 0x399c0471 #tb 0: 1/1000 @@ -6,54 +6,54 @@ a3f98769fe55bc5234cf75fb1949749a *tests/data/fate/matroska-ogg-opus-remux.matros #codec_id 0: opus #sample_rate 0: 48000 #channel_layout_name 0: stereo -0, -7, -7, 20, 402, 0x89b1c40f -0, 13, 13, 20, 216, 0x7bf97146 -0, 33, 33, 20, 215, 0x6cb86d8b -0, 53, 53, 20, 218, 0x9cfd691c -0, 73, 73, 20, 218, 0xd7fe6a94 -0, 93, 93, 20, 194, 0x35735de6 -0, 113, 113, 20, 216, 0x3ee6705a -0, 133, 133, 20, 218, 0x67eb6cb1 -0, 153, 153, 20, 218, 0x32d0700d -0, 173, 173, 20, 219, 0xcb7f6c60 -0, 193, 193, 20, 218, 0x9c866b33 -0, 213, 213, 20, 217, 0xfe3e6a53 -0, 233, 233, 20, 218, 0x13586833 -0, 253, 253, 20, 222, 0xbcb2669e -0, 273, 273, 20, 218, 0x8dfc6e33 -0, 293, 293, 20, 217, 0xf5957051 -0, 313, 313, 20, 210, 0xed126e6b -0, 333, 333, 20, 216, 0xbf947249 -0, 353, 353, 20, 203, 0x6c7e680a -0, 373, 373, 20, 209, 0xf78f6af4 -0, 393, 393, 20, 217, 0xd60c684d -0, 413, 413, 20, 218, 0x89056a7a -0, 433, 433, 20, 219, 0x0bc674ad -0, 453, 453, 20, 217, 0xb1d86d1a -0, 473, 473, 20, 220, 0x433d685a -0, 493, 493, 20, 364, 0x0c88be84 -0, 513, 513, 20, 221, 0x804a733d -0, 533, 533, 20, 215, 0x6e9d6e9b -0, 553, 553, 20, 215, 0x63016a83 -0, 573, 573, 20, 218, 0xf9a46fbe -0, 593, 593, 20, 216, 0xa0d66c08 -0, 613, 613, 20, 216, 0xa2ca6d0a -0, 633, 633, 20, 216, 0xf50e6f1d -0, 653, 653, 20, 215, 0x6aaa70b6 -0, 673, 673, 20, 219, 0x7ceb6ba0 -0, 693, 693, 20, 220, 0x398d6ca9 -0, 713, 713, 20, 218, 0x7bd06ed5 -0, 733, 733, 20, 219, 0xe2906c62 -0, 753, 753, 20, 217, 0xcf316ba1 -0, 773, 773, 20, 217, 0x470b6eea -0, 793, 793, 20, 359, 0x36c2a18a, S=1, 10 +0, 0, 0, 20, 402, 0x89b1c40f +0, 20, 20, 20, 216, 0x7bf97146 +0, 40, 40, 20, 215, 0x6cb86d8b +0, 60, 60, 20, 218, 0x9cfd691c +0, 80, 80, 20, 218, 0xd7fe6a94 +0, 100, 100, 20, 194, 0x35735de6 +0, 120, 120, 20, 216, 0x3ee6705a +0, 140, 140, 20, 218, 0x67eb6cb1 +0, 160, 160, 20, 218, 0x32d0700d +0, 180, 180, 20, 219, 0xcb7f6c60 +0, 200, 200, 20, 218, 0x9c866b33 +0, 220, 220, 20, 217, 0xfe3e6a53 +0, 240, 240, 20, 218, 0x13586833 +0, 260, 260, 20, 222, 0xbcb2669e +0, 280, 280, 20, 218, 0x8dfc6e33 +0, 300, 300, 20, 217, 0xf5957051 +0, 320, 320, 20, 210, 0xed126e6b +0, 340, 340, 20, 216, 0xbf947249 +0, 360, 360, 20, 203, 0x6c7e680a +0, 380, 380, 20, 209, 0xf78f6af4 +0, 400, 400, 20, 217, 0xd60c684d +0, 420, 420, 20, 218, 0x89056a7a +0, 440, 440, 20, 219, 0x0bc674ad +0, 460, 460, 20, 217, 0xb1d86d1a +0, 480, 480, 20, 220, 0x433d685a +0, 500, 500, 20, 364, 0x0c88be84 +0, 520, 520, 20, 221, 0x804a733d +0, 540, 540, 20, 215, 0x6e9d6e9b +0, 560, 560, 20, 215, 0x63016a83 +0, 580, 580, 20, 218, 0xf9a46fbe +0, 600, 600, 20, 216, 0xa0d66c08 +0, 620, 620, 20, 216, 0xa2ca6d0a +0, 640, 640, 20, 216, 0xf50e6f1d +0, 660, 660, 20, 215, 0x6aaa70b6 +0, 680, 680, 20, 219, 0x7ceb6ba0 +0, 700, 700, 20, 220, 0x398d6ca9 +0, 720, 720, 20, 218, 0x7bd06ed5 +0, 740, 740, 20, 219, 0xe2906c62 +0, 760, 760, 20, 217, 0xcf316ba1 +0, 780, 780, 20, 217, 0x470b6eea +0, 800, 800, 20, 359, 0x36c2a18a, S=1, 10 [PACKET] codec_type=audio stream_index=0 -pts=-7 -pts_time=-0.007000 -dts=-7 -dts_time=-0.007000 +pts=0 +pts_time=0.000000 +dts=0 +dts_time=0.000000 duration=20 duration_time=0.020000 size=402 @@ -63,10 +63,10 @@ flags=K_ [PACKET] codec_type=audio stream_index=0 -pts=13 -pts_time=0.013000 -dts=13 -dts_time=0.013000 +pts=20 +pts_time=0.020000 +dts=20 +dts_time=0.020000 duration=20 duration_time=0.020000 size=216 @@ -76,10 +76,10 @@ flags=K_ [PACKET] codec_type=audio stream_index=0 -pts=33 -pts_time=0.033000 -dts=33 -dts_time=0.033000 +pts=40 +pts_time=0.040000 +dts=40 +dts_time=0.040000 duration=20 duration_time=0.020000 size=215 diff --git a/tests/ref/fate/matroska-opus-remux b/tests/ref/fate/matroska-opus-remux index 61afeaa751..286bb65949 100644 --- a/tests/ref/fate/matroska-opus-remux +++ b/tests/ref/fate/matroska-opus-remux @@ -1,4 +1,4 @@ -551e45142f0989b281e837a3a86f0218 *tests/data/fate/matroska-opus-remux.matroska +2ab987ba7bad94b27fae427cdff57723 *tests/data/fate/matroska-opus-remux.matroska 9355 tests/data/fate/matroska-opus-remux.matroska #extradata 0: 19, 0x3a04048f #tb 0: 1/1000 @@ -6,65 +6,65 @@ #codec_id 0: opus #sample_rate 0: 48000 #channel_layout_name 0: mono -0, -7, -7, 20, 320, 0x58b9a88d -0, 14, 14, 20, 159, 0x6c9c4b4c -0, 34, 34, 20, 148, 0x0caf4b5d -0, 54, 54, 20, 139, 0xc5624226 -0, 74, 74, 20, 146, 0x633c4937 -0, 94, 94, 20, 153, 0x3d0b4f93 -0, 114, 114, 20, 158, 0xe5c55641 -0, 134, 134, 20, 156, 0xf2fd50ef -0, 154, 154, 20, 158, 0x93b15410 -0, 174, 174, 20, 157, 0xb6f74f5f -0, 194, 194, 20, 159, 0x9aff4957 -0, 214, 214, 20, 153, 0xfc5f4aba -0, 234, 234, 20, 158, 0x01e44f70 -0, 254, 254, 20, 153, 0x227149cf -0, 274, 274, 20, 155, 0x312f4cf6 -0, 294, 294, 20, 155, 0xafc54bae -0, 314, 314, 20, 151, 0x7b4252b3 -0, 334, 334, 20, 155, 0x29074a75 -0, 354, 354, 20, 149, 0x82c44bcd -0, 374, 374, 20, 150, 0x55c24eb5 -0, 394, 394, 20, 156, 0xf71d4f33 -0, 414, 414, 20, 153, 0x9b6c4ae5 -0, 434, 434, 20, 156, 0x75954e51 -0, 454, 454, 20, 155, 0x28ff4ff3 -0, 474, 474, 20, 153, 0xc4424969 -0, 494, 494, 20, 154, 0xfbf94cc8 -0, 514, 514, 20, 155, 0x52c549af -0, 534, 534, 20, 150, 0x6f1e4b7a -0, 554, 554, 20, 158, 0xabb45566 -0, 574, 574, 20, 157, 0xe61d4a99 -0, 594, 594, 20, 159, 0xf45d4fac -0, 614, 614, 20, 159, 0xcd0553a5 -0, 634, 634, 20, 156, 0xdb244e63 -0, 654, 654, 20, 154, 0x78654c52 -0, 674, 674, 20, 154, 0x9f804cc8 -0, 694, 694, 20, 150, 0x1fdf4c80 -0, 714, 714, 20, 155, 0x1adc4f89 -0, 734, 734, 20, 155, 0x4b53511c -0, 754, 754, 20, 151, 0x8ff2546d -0, 774, 774, 20, 158, 0xb7e34f1b -0, 794, 794, 20, 154, 0x4d98474b -0, 814, 814, 20, 154, 0x14924ea8 -0, 834, 834, 20, 153, 0x8d4752bf -0, 854, 854, 20, 149, 0x74785066 -0, 874, 874, 20, 151, 0x36c94a4c -0, 894, 894, 20, 155, 0x82904f3b -0, 914, 914, 20, 154, 0xd76b4a45 -0, 934, 934, 20, 159, 0x9fec548d -0, 954, 954, 20, 154, 0x9a084dcd -0, 974, 974, 20, 155, 0x90a54ac8 -0, 994, 994, 20, 324, 0x8e34a2f5 -0, 1014, 1014, 20, 268, 0x10f37203, S=1, 10 +0, 0, 0, 20, 320, 0x58b9a88d +0, 21, 21, 20, 159, 0x6c9c4b4c +0, 41, 41, 20, 148, 0x0caf4b5d +0, 61, 61, 20, 139, 0xc5624226 +0, 81, 81, 20, 146, 0x633c4937 +0, 101, 101, 20, 153, 0x3d0b4f93 +0, 121, 121, 20, 158, 0xe5c55641 +0, 141, 141, 20, 156, 0xf2fd50ef +0, 161, 161, 20, 158, 0x93b15410 +0, 181, 181, 20, 157, 0xb6f74f5f +0, 201, 201, 20, 159, 0x9aff4957 +0, 221, 221, 20, 153, 0xfc5f4aba +0, 241, 241, 20, 158, 0x01e44f70 +0, 261, 261, 20, 153, 0x227149cf +0, 281, 281, 20, 155, 0x312f4cf6 +0, 301, 301, 20, 155, 0xafc54bae +0, 321, 321, 20, 151, 0x7b4252b3 +0, 341, 341, 20, 155, 0x29074a75 +0, 361, 361, 20, 149, 0x82c44bcd +0, 381, 381, 20, 150, 0x55c24eb5 +0, 401, 401, 20, 156, 0xf71d4f33 +0, 421, 421, 20, 153, 0x9b6c4ae5 +0, 441, 441, 20, 156, 0x75954e51 +0, 461, 461, 20, 155, 0x28ff4ff3 +0, 481, 481, 20, 153, 0xc4424969 +0, 501, 501, 20, 154, 0xfbf94cc8 +0, 521, 521, 20, 155, 0x52c549af +0, 541, 541, 20, 150, 0x6f1e4b7a +0, 561, 561, 20, 158, 0xabb45566 +0, 581, 581, 20, 157, 0xe61d4a99 +0, 601, 601, 20, 159, 0xf45d4fac +0, 621, 621, 20, 159, 0xcd0553a5 +0, 641, 641, 20, 156, 0xdb244e63 +0, 661, 661, 20, 154, 0x78654c52 +0, 681, 681, 20, 154, 0x9f804cc8 +0, 701, 701, 20, 150, 0x1fdf4c80 +0, 721, 721, 20, 155, 0x1adc4f89 +0, 741, 741, 20, 155, 0x4b53511c +0, 761, 761, 20, 151, 0x8ff2546d +0, 781, 781, 20, 158, 0xb7e34f1b +0, 801, 801, 20, 154, 0x4d98474b +0, 821, 821, 20, 154, 0x14924ea8 +0, 841, 841, 20, 153, 0x8d4752bf +0, 861, 861, 20, 149, 0x74785066 +0, 881, 881, 20, 151, 0x36c94a4c +0, 901, 901, 20, 155, 0x82904f3b +0, 921, 921, 20, 154, 0xd76b4a45 +0, 941, 941, 20, 159, 0x9fec548d +0, 961, 961, 20, 154, 0x9a084dcd +0, 981, 981, 20, 155, 0x90a54ac8 +0, 1001, 1001, 20, 324, 0x8e34a2f5 +0, 1021, 1021, 20, 268, 0x10f37203, S=1, 10 [PACKET] codec_type=audio stream_index=0 -pts=-7 -pts_time=-0.007000 -dts=-7 -dts_time=-0.007000 +pts=0 +pts_time=0.000000 +dts=0 +dts_time=0.000000 duration=20 duration_time=0.020000 size=320 @@ -74,10 +74,10 @@ flags=K_ [PACKET] codec_type=audio stream_index=0 -pts=14 -pts_time=0.014000 -dts=14 -dts_time=0.014000 +pts=21 +pts_time=0.021000 +dts=21 +dts_time=0.021000 duration=20 duration_time=0.020000 size=159 @@ -87,10 +87,10 @@ flags=K_ [PACKET] codec_type=audio stream_index=0 -pts=34 -pts_time=0.034000 -dts=34 -dts_time=0.034000 +pts=41 +pts_time=0.041000 +dts=41 +dts_time=0.041000 duration=20 duration_time=0.020000 size=148 From patchwork Thu Sep 1 21:24:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37606 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp545443pzh; Thu, 1 Sep 2022 14:25:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR5vI95gx7zIfnO4JXTLvyDxSFZcXBepzC9+ZAtLBNSujmUJYRgZgxP0ypB9z12VA+TdAVbY X-Received: by 2002:a17:907:1688:b0:730:b3ae:347 with SMTP id hc8-20020a170907168800b00730b3ae0347mr25166611ejc.756.1662067501273; Thu, 01 Sep 2022 14:25:01 -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 u25-20020aa7d0d9000000b0043e8b2ed68esi128909edo.605.2022.09.01.14.25.01; Thu, 01 Sep 2022 14:25:01 -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=Ctm2MRJQ; 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 D054768BA0E; Fri, 2 Sep 2022 00:24:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2098.outbound.protection.outlook.com [40.92.89.98]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 96EA668B9CE for ; Fri, 2 Sep 2022 00:24:38 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LgW1EUJTIYj978OpqhFcLjXfyYt1BNj5PAHfIIQv4rce6sAVDeKyQj/w3V1Oqrrw8h73mMW2ptbjUu7gLFYiVb4AgNxOBnWMUNvqGhlCcMHCI9Q5cM9zXnTcyyhfbfBfmb4b9iOn1wqFgy3F72A0vkyGsC/hQfe1GptqhWtKznAAE1FvJx+khDTFlqC2uSj++zX4vLBIjw4c3jNB4CXDclkgJnUWZLzYMteNvQn5HRJY1j4PrNUz9s8r969BUEzsLxd4JszN14jxQzjU3/cq/K0e4a55ciMb/7PbEFliLxxY8dpQtfCVve0vZfVQAQ47yYuppj1XMN0HHH9HFhOfww== 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=WAEvngIjyFZAGF39gFz4xHmBXq58MUW6AHekTNoHRH0=; b=SzJPRLR2tUfKT0hHK/6bUPAXKWfTb1FU6RBCIckKjxYNAch4xqBgKzaB018yDsuVX5ozyeB8ncS4SGE+a0ESd8bKIgH5N4ab7LH/+gQgME9KFHR7dAW8jSb5XfQ+Vn6U4ZRL4z09ZfOXV8O/7XzM0XYEW3YU0fb9S3+uyKR62OGPMg6xgTRxNf7JjRkkILZ3Dzu14rO5l46LAxDxm4DzoEkMCRuvjgR5NycKZU0D+GV7s0PndNyo6Bz8UM0XZvs5Al5DVCZYgo5nteraANd2YSr+/X830Q3uccV3/McznbkEUY1vVCfIJJV1TPvcYqkCY/IvkXIVU5Dgtr+atwQy+g== 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=WAEvngIjyFZAGF39gFz4xHmBXq58MUW6AHekTNoHRH0=; b=Ctm2MRJQVVYoKE4qEcKO6HwiVj5D90RSOWv/kUgKmXFnWIAwvd8/A9m/UbFXRoBLaV3WaARnbnpuZQszh3u9rFKJMqGvYJZYqXR/P8Cta+OzmvECEgSB9VnRM43BK93tM1LlT31fnzpA4YXcdfsnQB9QVQ07D+naBwf3d5PDHeqx4N6IM2My2SfqZI6ujmVoFJcH/7m7vLpVXbshlzeAyaZOLINldcQcsNjlblleW2mZX/Lj652P/n6f+tcjNJp05Ge7PwSDVr3uAWCIRJnDFcOue2jjSJIMxsmI8OqGN8htFZ9SmqB8AhtrfAvXa3qjnmA331VMFtgKH7ujP3PvFg== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PAXP250MB0424.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:287::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Thu, 1 Sep 2022 21:24:28 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6%7]) with mapi id 15.20.5588.010; Thu, 1 Sep 2022 21:24:28 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Sep 2022 23:24:01 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [JHQVHIxwRrAWaJLyBA2bhrnNAF6EALXc] X-ClientProxiedBy: ZR0P278CA0185.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::18) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220901212403.2622789-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 16ffe1a9-71d1-4544-cec8-08da8c605a36 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqZFoN70z2NlsBDiuHIk4Y3ZEfARnOOryo1X1ye+O0WDOc99iphgZbbWGRDkN/FqDY11dZrnQ0QrpnBCM+r0kvX8oms7wOpbzykAevf/Bf6kBXT6wb+ktW1qCjR4QUe1I3m0zxsRtUW95DGosyvLW+i2eF+qeNUbXs1WqkKE+r/bH39WpIZdwn6L/8+ew2WtVchx4ucibcLGW/lc9edqjf6HQjc8DfIXmjT/9DT7Sup42JMfyQS+yYN/Aid5VpiLKwmsW1Y0vw66EJzHnNzs4NXb8N8mXoZBdJTOK/6Tuzg4QDtni7HrXDoHLgRS0sbOjPOKTbcoo/xzgY9dUnz22yzjXR/e79oRujaYv4R58aLLZHohT48pXG94DAgiKyHVYEfZBgLvUaDYcVnJWUDjZF627dIHqu0GQLxxHwLbar0MKUVxa2R8OMTnZYyyGqx5iKcc54PI9H0rN808w2fLk/EbX6L/oFYpx9AuExzrM48raGCcZfNhMdhR8tGfRlNqfuqtJhW4ohp/nJPeUzeGIbB7H/PZ4y2oU8rsQklJvH3ufcabV9nXlpn/2mtBWA9mtYVyVQ6OYGARM5XEPlGKrhx1sEyYiOD8Gd/5hNvSxRXhEMt+e5afmJcUA4b86FWcVW6npBPskpmYN98WXwFpVlZmU1Ry7aydSeQ3FYxXy9NGVJPR48EDhXonZ4l595qptojqv0EvCPU1/BEPoaNqCDmvK3S/BhKkNO7OUhA9JilipzkfJ+pNYrHFcR2aXaeDWg= X-MS-TrafficTypeDiagnostic: PAXP250MB0424:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VBP+cZWVkAdvhurSOLniX9aN8kuNW6too533VzDhyCHQMLEr5LQ45OKStQ0hXg5y162YTjyLkqxcjJLa8ET4aP+j7kecKznn0Vs+8+47LnBHBf2FRf/7Wj32TOeLwcacsAN0TNGcUDgH7XhMUQJP5G6Jwm2ToxFms9j3Bz2ihku0WY746LGpoKhGtdTNdM7czrAcP+f6i6lVG8NiuAFayE3fYUMqZotBpny5U0GluM3EiBNjdufy6Re9BrJXPKb6iM16K0sgPgR3m63qZjYWbu31RQ6qLgcjm8s4tytofxpE8UHsTS0W4x0h7xRORULSAj7ZeVfPIe1N5UhJ9xVtrWEVselEMq4d2ey2Gxu/+WLm8kmiBH84+7rC+lH5gbFjaklFRKJwnJCN/wQlFoxqC23R6MIaz/xJbNQuNDVUZDRKvKs/zmFKjC3kDB9fNosYPgfLYwsCR30x7tyKPqOI2W3npSF/L9HYLhLhBRreua0sSS3+PVx0LUae0uW69bC3ykzgfNlU+voDrnXsbg5NjNDNdicN6s0a/xsJ+bTN1IqXBWljxM71gG22rkpfLgUNH9tQ1VYFZZzXxFNtTfanmRToEjN7c3jYrMddTlMshZlIU6PBkRwg/6zj8NWKxRdRp9bFw7eG5QQqzcoGXZz0qA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /iZqhGvry3nQDbGSVyRDm8bL0q53NGlCL1X1ZB8H6nKv6fHxRrbBIwry0yZNs+0aoPERoB6Xw8Qu+a6Iha7C/51djflteOAVEhB8E/1yOEsLwqx7fI6HatajVtLZIXcTcNXzsLvCW1Qc5F2sbyGJYIyzWISDGMatx/86TfFStn7xKY+h4OxG8A35rJkbBTqDtqJFE23067DpOI6dNzXhYVGLDBtrDem5evIHqffqi+yJzHERh7GAgfXnQ3muFY8DZCF/n+0nZVehCsUPe3j7aIZggihzSBGxr7dWQTaeumesrnTpFP1ZxMPVzlut4IysatKNRkG0yPBoklj9O6enUZa5oKKoz9cOwsfRUSUPuBBcUSbsxENQiCjSzs0grtTbijioK05XlX1asTJvGg6G/YD9aiXlu3wlhybC7Nifz6S1uAt1362VHyF26AHqFfGzFBzn4xbfYKG262JCao1FnbOL/FvFiMpulAUktkp4oBvBbNSJkhecfMGCcVdQ8hHc7p9VEBtYt9L7NsBvB3TEPYRoMmyzyCAyvk7AETyrosv/btfOb5lp+0jJ458mQ6shbgyyoKPOp4chGG0UbVbVspQtw3z1baeE1A3RtWlXu38cM7YYryS+FRKY4PdTZFN5P1gxKf2qZQ/wGSsxpzpS5nI6Z7Otyui4xfErV48kS5T0511dk7aW1+Ec6fQAzwJUC8kgAa2aWbiu36c2KpNw0JSJIhGRTtE90GEyHud64CogtNQDChWbvcPYQ5CYyOUFftwkQX7Tbh5PNBZD4nr+7qCLBlIkTbXI4HUlGWdGvTrz0gd2OJz1ieH+2eIPDZYN0ic93h256SY+PLStz6d2aQvEEhY3NKHnrpN++Q/RMM9X4xY8TBUpemb9iARTceLbkTanIyees2fhqhvPUQxQ6s09SaY41vD88gV4P5FQOS01nOLa7AB4GJQjtyG+DF6eJ9jQ0FKsinw21xIf6IFPymkXaW7RrdtGgLA/GOto5mVvnc7tgDwDPpMc76QTqmlcktP77g/u84zsfh7bEeT3KEXHxHj6YGZOaIKFM3CQpxhXgx79IZlE0GIjR4uP+WR1uQ0jZZNtu6kYldhxewRPESPNQEOcf4pAdozvJ+PAd/7W3TQzEZw4GpCGsudUiV9bz1kcU5rICXI35nH7vhdSZ+cKOClnXKrdtgnH8XdObnG73/PvVkZajS3c2WmDovzqNCljsUd7vD7DVWlGT5wng92S2Ncs77yxO1+0kgqBJCK/qP20Hkeb74HWjJCO5170P0e0ZhPc+Ori06MuxhF9kyf2Oa9QNf1Z0kUgSdKUwTk= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16ffe1a9-71d1-4544-cec8-08da8c605a36 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 21:24:28.6512 (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: PAXP250MB0424 Subject: [FFmpeg-devel] [PATCH 6/8] avformat/mux: Allow muxers to set custom min timestamp 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: 2JEVHEshUPck Matroska requires pts to be >= 0 with a slight exception: It has a mechanism to deal with codec delay, i.e. with the data added at the beginning that does not correspond to actual input data and should be discarded by the player. Only the audio actually intended to be output needs to have a timestamp >= 0. In order to avoid unnecessary timestamp shifting, this patch allows muxers to inform the shifting code about this so that it can take it into account. Signed-off-by: Andreas Rheinhardt --- libavformat/internal.h | 7 +++++++ libavformat/mux.c | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/libavformat/internal.h b/libavformat/internal.h index 9b07cfb271..23757dc4fc 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -310,6 +310,13 @@ typedef struct FFStream { */ int64_t mux_ts_offset; + /** + * This is the lowest ts allowed in this track; it may be set by the muxer + * during init or write_header and influences the automatic timestamp + * shifting code. + */ + int64_t lowest_ts_allowed; + /** * Internal data to check for wrapping of the time stamp */ diff --git a/libavformat/mux.c b/libavformat/mux.c index a3b50dadb6..5d89458f82 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -632,6 +632,8 @@ static void handle_avoid_negative_ts(FFFormatContext *si, FFStream *sti, if (ts == AV_NOPTS_VALUE) return; + ts -= sti->lowest_ts_allowed; + /* Peek into the muxing queue to improve our estimate * of the lowest timestamp if av_interleaved_write_frame() is used. */ for (const PacketListEntry *pktl = si->packet_buffer.head; @@ -640,6 +642,7 @@ static void handle_avoid_negative_ts(FFFormatContext *si, FFStream *sti, int64_t cmp_ts = use_pts ? pktl->pkt.pts : pktl->pkt.dts; if (cmp_ts == AV_NOPTS_VALUE) continue; + cmp_ts -= ffstream(s->streams[pktl->pkt.stream_index])->lowest_ts_allowed; if (s->output_ts_offset) cmp_ts += av_rescale_q(s->output_ts_offset, AV_TIME_BASE_Q, cmp_tb); if (av_compare_ts(cmp_ts, cmp_tb, ts, tb) < 0) { @@ -669,7 +672,7 @@ static void handle_avoid_negative_ts(FFFormatContext *si, FFStream *sti, pkt->pts += offset; if (si->avoid_negative_ts_use_pts) { - if (pkt->pts != AV_NOPTS_VALUE && pkt->pts < 0) { + if (pkt->pts != AV_NOPTS_VALUE && pkt->pts < sti->lowest_ts_allowed) { av_log(s, AV_LOG_WARNING, "failed to avoid negative " "pts %s in stream %d.\n" "Try -avoid_negative_ts 1 as a possible workaround.\n", @@ -678,7 +681,7 @@ static void handle_avoid_negative_ts(FFFormatContext *si, FFStream *sti, ); } } else { - if (pkt->dts != AV_NOPTS_VALUE && pkt->dts < 0) { + if (pkt->dts != AV_NOPTS_VALUE && pkt->dts < sti->lowest_ts_allowed) { av_log(s, AV_LOG_WARNING, "Packets poorly interleaved, failed to avoid negative " "timestamp %s in stream %d.\n" From patchwork Thu Sep 1 21:24:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37607 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp545515pzh; Thu, 1 Sep 2022 14:25:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR4VWiHKwo4/FFjuWarqPHaV+m7wLuCE5Fxf6n0PLR6/K2vwnZfxmuzJr7ILQAKD0gHuDuEY X-Received: by 2002:a17:907:2c78:b0:741:4b9b:8d40 with SMTP id ib24-20020a1709072c7800b007414b9b8d40mr18075120ejc.553.1662067510915; Thu, 01 Sep 2022 14:25:10 -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 c14-20020a170906d18e00b0073d4bc78737si277933ejz.212.2022.09.01.14.25.10; Thu, 01 Sep 2022 14:25:10 -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=uwEpR0iC; 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 CC4EE68BA31; Fri, 2 Sep 2022 00:24:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2098.outbound.protection.outlook.com [40.92.89.98]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B8CC968B9EC for ; Fri, 2 Sep 2022 00:24:38 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gpR4MYPVhUAvjZDN4zJdLcvy5DxIZj6W+xfdkKLkjfyqs9BrOdFD2MZQ5LlFtzLJ8xjYlgAq0KXuzlMk8N2KrmIo6bvoqPwEQO2rOxj6WfJ2Grj0oArWXz2NjVEluXX0fOqb9Wn36mKVFFOPmMq025H0QWm78XMLulj05J5Fp7aSl9MzqtOpvne2uKgYSmrInBEE+CwPYW3qRfIBXLXy8tzY/6119XYYrJApxTNOAKrJoxLTAd/c5WmPEQRvyyNINhDyfLLi++CmfJnSCB380M4cwbuinCJmUXkTsCHDIw3ELqnmpecXApNlGohAO24zsJUnIYu6T1GhpRkuB29R6g== 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=SDkVA39yrELG3oc8AuYK6VkuoKR3oUcWvGJYwBF91r4=; b=FLtpS8P3h4U5PDZmrjpMiAvUrb13bYC9/1rQ2nbpihNWX+l4VCo6PjkZBE2jSJ+UOcVDLGQgRYrw27kjjBXESjMyoVFKw87EHtG+izlXp/7AV+ux3RbMZ4c9bOrE3wWSb8nau+ufZOzMXbHK6zDUI9cRw4tw6uelGQsplhG3RwNtWyTfKKcqAr7vbsEdgn322th5g7I6brlAWkycd0Qv4vy3J1B37EpzFLZCAnSP46NnJq17iVsdsiDCcG9O/2Ioe4SXfHiBio5/3K6U8kgeXPo9gZBJMMVsBhbDmCAQXYwmk+DPoq7BnkHary4lAmayxC8GM4BgaF/EN9OwxMdkjQ== 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=SDkVA39yrELG3oc8AuYK6VkuoKR3oUcWvGJYwBF91r4=; b=uwEpR0iCTOg8PGSE5wy4uHDXJo4MrAXgurMnzVMfsJawpULXDJ+bDgQnu+2Ql9VryWrUgtIz7RMhCmudWQN+HRtAOjFo8KTK0jK2lq+BHzvWR9P552wnW0USiXBjk3VF2sudSUpsKEBV/F4r28VnXcPXk/fO/QlKjGHIwlCdk5wiqdlOyJ5RnJh/DlRdoIsAMuNDAyrw7YayV2qhIQgVL9zWRA0ZBAnSJ96b4ZYCTOqT3o0n+8AIXkrVpZjj8l3d6xqRGPbfdJF1s5pvuIkuMZd06Dnr1DgvLW9s/qtUV5JAih01rVDTXaH7w0c+Dk8qkAB692RY2V5BSwOmNrUucA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PAXP250MB0424.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:287::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Thu, 1 Sep 2022 21:24:31 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6%7]) with mapi id 15.20.5588.010; Thu, 1 Sep 2022 21:24:31 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Sep 2022 23:24:02 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [d5TAK5CqodlIs5jDXd+YAdtvht1Pf7ej] X-ClientProxiedBy: ZR0P278CA0185.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::18) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220901212403.2622789-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f48700ca-1527-4380-dfeb-08da8c605bc9 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmqZFoN70z2NlsBDiuHIk4Y3LunBwTuqgs7qpIQ2JURsAcG5JUQk4AZK1NBYIwBJmGMlBjtB0+tJ4nnA29ZMJa5HBiziEy+xYDAfv34sIqnWF6jF2geFcZD94HYoXWYowhKcR1oUdI1YVv6OxRndvnnlw8LEjCTTqHCTbwUeG8vl9u8cgV8+VX90YZFRQ0Xg6SQTSVXP8iqKB4fq9Vlz+HNcliuIsJdbrsadGipX3QpsAjM/nOlDrmzgXGAbu5cX9JDW+AASzO391unlWRTufJONu8zt/5gG1fmIY6NyqdyesemX/eZZ2sNLZGq5NfsW8VfCUd/G21ipxqF/Rtl0T+R5djWsEIZ1Cd+R0kwe/dtC0T0mvDCaqpyvbzVFDz5Yfnis0l2qAiTj1+HIOzktbApo4jB+MTVjacBDVRFYZMkE61dnqT7UmilW0OQ/WqBbUCOJKloLxMc01av3IfceFJwls+XmrnmrADEd6/8WptFPb7rt5uAIFeoLdJafrBnt5jiDXK8uXnZWE90bNQfwpiZmCjOc8k+Q5LxgHynnfvfzBB/PrGrYdu9RDzGsyWnHhSBO9TWASGfrComIRVBwfekmSRmAhEOgmtt2XjaWAKGNtd3T5p7Azihnla3blKTZZ2dKuToxDSmGiDrgXtLrpAmx/b+ig7tJPw7dWFrsrIKxAIP4HNJ/88CS/xAvp+c8lNaaWmbM3sZGBCfVok8wp6a6VEea/rM/v5Si2tk+XhLGzbmKf14dgX8GEbE530B44v4= X-MS-TrafficTypeDiagnostic: PAXP250MB0424:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ijohV1Ot6q3EaWKp8Qt57HTp2v0/4HOVIxoBiHQO2fu4PwNzjpFu2ohO1Aje+CPcSiO1llYcgNIYbq43FIZG3wWpH8Tcw4X1YqxsmAqPzRhij8KWlTJna+w6B52Y99S0cX0PSQA48FpPe3MJI8gToFW2XOX06PrK2W8N56tf+PQQ+9dCIXQvKGy8uzsnIJhnsTRpz6L43+haYllkbx6HZjm9X1DEHylmAcXu2hlIprvN2UqjzQ5pWukRMriqfJsI3OQ6t0l18Fz/rHLdJBd4S/FsMZeZmRsIu2olcRm2KgguoCj7+8uaWtR7eL2bIWMWJ7hpeBO5ILWaZXXo58xoSMOBMe+lNMvDlhlvShXZRzYZPqOI2Hjj6rgfnLQJU25K2PjXnJho/hD6lM4DjVXplp0NOLDrhX15QcE20vrRqrFXlb5XE84t7y0iBo6IO2o990q/eOHUUfiqy+i8faJDY4d/qRPOnTr0OWgcWevTxX3JO1+lSiCWGrus3IBH995nG0ql+j8QlJyuwT49SPfwDJEiE8pDhx2SSr2sQEROTCXRwcKu0vrh+csrXe7KjGI1UPEoyYtt5v/V1HlzUnhV+Sje/1Fw7NzgxTHWqrGW43eQ+7kKjvftCxI4SjLL3f/r68U8xEEU+fDb6HMwwmU4Dw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XRBc6Giz6vNhDWb/kRjUgtEk/vCtY4mIP8DbFgeP5oe+SwNZYAEjV3e0kkcrEeg/YR7rTTz+rg4aE9zjXa170aUoMQc/PeTUaFSDTpceQKHJDwgjUhoRG9ZnfJnuakRbjQ2izxPm3Mnpt6JwFECqPEk4fS1wW+0kG2CDh156s1/VzNQJBOS3r9UzVGF0nYUCKlhdKDoZawPeUffheEGrf2TMyIcHrAWZqUrZzYUfMnhUmhZxz6MZ7M2EIRmdMd1jEz+FLg7p0iKO0VkPdRubhHAdencdhxnfBdcEyNbmvRsMmtvtzUvC5/BrY2MGRptdclY7LHL1pkUF6FlT3YWFXT8Vpbxh22dcxNS8vY586GG6aIcAxOFVo5XtSy7TBiHyh41C1RF83Tfx0i0ocWKgmgvozqigVrbXnx+rnmynUQWQTjLsUUyL4fuNcOqreKNebQ3RuXHvdHs+5Md3+W2TdjdiEjflSo+KYZrZoSe8jshSAR/dwxloYtHf8fuX0nJjwL7Ha4c2jG7BD+69UKpzkbNlyM+HXhykPjxgPFYGKRnK90YtY7jGIXYuPmZVCPNIiiV8gRP46rlonCFgf5peUZczt1VON7lKcZHL7RDPogTB5/Wun6dmypYR4jjd9ccse8JXxCc8bhfbxyLVnx8v7g0VV3PmQYQNXEwF5da6uQjepYdWIa9u0wBWnGeBHN51EnSFg3uJqemfjHorVxuNaCoSzXIx25KK7VlPhOKoNGuXTOzAY/Ackf8YQMZN9TRNuYiMVZ6YtUYV7TiPFFI7kEZXyhsr0apts0/VOGyhezEoNGSBv8WpemISitYON9FmLygCHytZgzsGVmWDMesQoJU3fMhE8LM6UNYOVxamq88WzpsfvXXPGwGBs66OB532DCOtUpPL3IGaIuvUAVDMI99Fxyn+eybgFsldnR6QCUyqaYU/6dPaolQmJyN8dzMKYhAxVs6axRxa49+k2B/Am7C6FuPcrSiVFNdrkQuIvtiBD/D891gcpQ3QS6ytF49Wsn8V29Qu9gCw4kCvN+AnHFpoDsLiD6uoQzDChCCupZOHRmAyTTiwXwIDu5/i6QvbdElwq2KLoRnIH3fFo3Uod6xJgo1oTRJxpCAfekPyZNxpqAiwP/wpU3CRMmfWMDFk8S6LNDRCkKRm8bywitaSqy5IkWORWOgESHbXm/NrVylHVxc5SO0p2+k0YxSVOK1EF0xIhbPzFD1zNIbUlxAupfqzFro3OmL1gkIYnkzdFsqw3UNRqABDXkyppTv3iY+eowwW60THe2YPSTB86AjLpZxpkkLPodKbFlZcPHQhyOE= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f48700ca-1527-4380-dfeb-08da8c605bc9 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 21:24:31.3396 (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: PAXP250MB0424 Subject: [FFmpeg-devel] [PATCH 7/8] avformat/matroskaenc: Use custom min timestamp 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: V9as2Qxf/d39 Signed-off-by: Andreas Rheinhardt --- libavformat/matroskaenc.c | 1 + libavformat/webm_chunk.c | 4 + tests/fate/matroska.mak | 2 +- tests/ref/fate/matroska-ogg-opus-remux | 108 ++++++++++---------- tests/ref/fate/matroska-opus-remux | 130 ++++++++++++------------- 5 files changed, 125 insertions(+), 120 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 0ded53dc21..97dcff5607 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1841,6 +1841,7 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv, track->ts_offset = av_rescale_q(par->initial_padding, (AVRational){ 1, par->sample_rate }, st->time_base); + ffstream(st)->lowest_ts_allowed = -track->ts_offset; } if (par->codec_id == AV_CODEC_ID_OPUS) put_ebml_uint(pb, MATROSKA_ID_SEEKPREROLL, OPUS_SEEK_PREROLL); diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c index 9e71a1209d..916ed0cbab 100644 --- a/libavformat/webm_chunk.c +++ b/libavformat/webm_chunk.c @@ -127,6 +127,7 @@ fail: ffformatcontext(s)->avoid_negative_ts_use_pts = ffformatcontext(oc)->avoid_negative_ts_use_pts; oc->avoid_negative_ts = AVFMT_AVOID_NEG_TS_DISABLED; + ffformatcontext(oc)->avoid_negative_ts_status = AVOID_NEGATIVE_TS_DISABLED; return 0; } @@ -149,10 +150,13 @@ static int webm_chunk_write_header(AVFormatContext *s) { WebMChunkContext *wc = s->priv_data; AVFormatContext *oc = wc->avf; + AVStream *st = s->streams[0], *ost = oc->streams[0]; int ret; ret = avformat_write_header(oc, NULL); ff_format_io_close(s, &oc->pb); + ffstream(st)->lowest_ts_allowed = ffstream(ost)->lowest_ts_allowed; + ffstream(ost)->lowest_ts_allowed = 0; wc->header_written = 1; if (ret < 0) return ret; diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak index 94532b31dc..63e81f121b 100644 --- a/tests/fate/matroska.mak +++ b/tests/fate/matroska.mak @@ -166,7 +166,7 @@ fate-matroska-mpegts-remux: CMD = transcode mpegts $(TARGET_SAMPLES)/mpegts/pmtc # Tests maintaining codec delay while remuxing from Matroska. # For some reason, ffmpeg shifts the timestamps of the input file # to make them zero before reaching the muxer while it does not -# for the ogg-opus-remux test. +# for the ogg-opus-remux test. -avoid_negative_ts make_zero counters this. FATE_MATROSKA_FFMPEG_FFPROBE-$(call REMUX, MATROSKA, OPUS_PARSER OPUS_DECODER) += fate-matroska-opus-remux fate-matroska-opus-remux: CMD = transcode matroska $(TARGET_SAMPLES)/mkv/codec_delay_opus.mkv matroska "-avoid_negative_ts make_zero -c copy" "-copyts -c copy" "-show_packets -show_entries stream=codec_name,initial_padding -read_intervals %0.05" diff --git a/tests/ref/fate/matroska-ogg-opus-remux b/tests/ref/fate/matroska-ogg-opus-remux index da9c8d285b..1fa776ef01 100644 --- a/tests/ref/fate/matroska-ogg-opus-remux +++ b/tests/ref/fate/matroska-ogg-opus-remux @@ -1,4 +1,4 @@ -47b6b69c2ffdf5729557e90c72d241e9 *tests/data/fate/matroska-ogg-opus-remux.matroska +a3f98769fe55bc5234cf75fb1949749a *tests/data/fate/matroska-ogg-opus-remux.matroska 10200 tests/data/fate/matroska-ogg-opus-remux.matroska #extradata 0: 19, 0x399c0471 #tb 0: 1/1000 @@ -6,54 +6,54 @@ #codec_id 0: opus #sample_rate 0: 48000 #channel_layout_name 0: stereo -0, 0, 0, 20, 402, 0x89b1c40f -0, 20, 20, 20, 216, 0x7bf97146 -0, 40, 40, 20, 215, 0x6cb86d8b -0, 60, 60, 20, 218, 0x9cfd691c -0, 80, 80, 20, 218, 0xd7fe6a94 -0, 100, 100, 20, 194, 0x35735de6 -0, 120, 120, 20, 216, 0x3ee6705a -0, 140, 140, 20, 218, 0x67eb6cb1 -0, 160, 160, 20, 218, 0x32d0700d -0, 180, 180, 20, 219, 0xcb7f6c60 -0, 200, 200, 20, 218, 0x9c866b33 -0, 220, 220, 20, 217, 0xfe3e6a53 -0, 240, 240, 20, 218, 0x13586833 -0, 260, 260, 20, 222, 0xbcb2669e -0, 280, 280, 20, 218, 0x8dfc6e33 -0, 300, 300, 20, 217, 0xf5957051 -0, 320, 320, 20, 210, 0xed126e6b -0, 340, 340, 20, 216, 0xbf947249 -0, 360, 360, 20, 203, 0x6c7e680a -0, 380, 380, 20, 209, 0xf78f6af4 -0, 400, 400, 20, 217, 0xd60c684d -0, 420, 420, 20, 218, 0x89056a7a -0, 440, 440, 20, 219, 0x0bc674ad -0, 460, 460, 20, 217, 0xb1d86d1a -0, 480, 480, 20, 220, 0x433d685a -0, 500, 500, 20, 364, 0x0c88be84 -0, 520, 520, 20, 221, 0x804a733d -0, 540, 540, 20, 215, 0x6e9d6e9b -0, 560, 560, 20, 215, 0x63016a83 -0, 580, 580, 20, 218, 0xf9a46fbe -0, 600, 600, 20, 216, 0xa0d66c08 -0, 620, 620, 20, 216, 0xa2ca6d0a -0, 640, 640, 20, 216, 0xf50e6f1d -0, 660, 660, 20, 215, 0x6aaa70b6 -0, 680, 680, 20, 219, 0x7ceb6ba0 -0, 700, 700, 20, 220, 0x398d6ca9 -0, 720, 720, 20, 218, 0x7bd06ed5 -0, 740, 740, 20, 219, 0xe2906c62 -0, 760, 760, 20, 217, 0xcf316ba1 -0, 780, 780, 20, 217, 0x470b6eea -0, 800, 800, 20, 359, 0x36c2a18a, S=1, 10 +0, -7, -7, 20, 402, 0x89b1c40f +0, 13, 13, 20, 216, 0x7bf97146 +0, 33, 33, 20, 215, 0x6cb86d8b +0, 53, 53, 20, 218, 0x9cfd691c +0, 73, 73, 20, 218, 0xd7fe6a94 +0, 93, 93, 20, 194, 0x35735de6 +0, 113, 113, 20, 216, 0x3ee6705a +0, 133, 133, 20, 218, 0x67eb6cb1 +0, 153, 153, 20, 218, 0x32d0700d +0, 173, 173, 20, 219, 0xcb7f6c60 +0, 193, 193, 20, 218, 0x9c866b33 +0, 213, 213, 20, 217, 0xfe3e6a53 +0, 233, 233, 20, 218, 0x13586833 +0, 253, 253, 20, 222, 0xbcb2669e +0, 273, 273, 20, 218, 0x8dfc6e33 +0, 293, 293, 20, 217, 0xf5957051 +0, 313, 313, 20, 210, 0xed126e6b +0, 333, 333, 20, 216, 0xbf947249 +0, 353, 353, 20, 203, 0x6c7e680a +0, 373, 373, 20, 209, 0xf78f6af4 +0, 393, 393, 20, 217, 0xd60c684d +0, 413, 413, 20, 218, 0x89056a7a +0, 433, 433, 20, 219, 0x0bc674ad +0, 453, 453, 20, 217, 0xb1d86d1a +0, 473, 473, 20, 220, 0x433d685a +0, 493, 493, 20, 364, 0x0c88be84 +0, 513, 513, 20, 221, 0x804a733d +0, 533, 533, 20, 215, 0x6e9d6e9b +0, 553, 553, 20, 215, 0x63016a83 +0, 573, 573, 20, 218, 0xf9a46fbe +0, 593, 593, 20, 216, 0xa0d66c08 +0, 613, 613, 20, 216, 0xa2ca6d0a +0, 633, 633, 20, 216, 0xf50e6f1d +0, 653, 653, 20, 215, 0x6aaa70b6 +0, 673, 673, 20, 219, 0x7ceb6ba0 +0, 693, 693, 20, 220, 0x398d6ca9 +0, 713, 713, 20, 218, 0x7bd06ed5 +0, 733, 733, 20, 219, 0xe2906c62 +0, 753, 753, 20, 217, 0xcf316ba1 +0, 773, 773, 20, 217, 0x470b6eea +0, 793, 793, 20, 359, 0x36c2a18a, S=1, 10 [PACKET] codec_type=audio stream_index=0 -pts=0 -pts_time=0.000000 -dts=0 -dts_time=0.000000 +pts=-7 +pts_time=-0.007000 +dts=-7 +dts_time=-0.007000 duration=20 duration_time=0.020000 size=402 @@ -63,10 +63,10 @@ flags=K_ [PACKET] codec_type=audio stream_index=0 -pts=20 -pts_time=0.020000 -dts=20 -dts_time=0.020000 +pts=13 +pts_time=0.013000 +dts=13 +dts_time=0.013000 duration=20 duration_time=0.020000 size=216 @@ -76,10 +76,10 @@ flags=K_ [PACKET] codec_type=audio stream_index=0 -pts=40 -pts_time=0.040000 -dts=40 -dts_time=0.040000 +pts=33 +pts_time=0.033000 +dts=33 +dts_time=0.033000 duration=20 duration_time=0.020000 size=215 diff --git a/tests/ref/fate/matroska-opus-remux b/tests/ref/fate/matroska-opus-remux index 286bb65949..61afeaa751 100644 --- a/tests/ref/fate/matroska-opus-remux +++ b/tests/ref/fate/matroska-opus-remux @@ -1,4 +1,4 @@ -2ab987ba7bad94b27fae427cdff57723 *tests/data/fate/matroska-opus-remux.matroska +551e45142f0989b281e837a3a86f0218 *tests/data/fate/matroska-opus-remux.matroska 9355 tests/data/fate/matroska-opus-remux.matroska #extradata 0: 19, 0x3a04048f #tb 0: 1/1000 @@ -6,65 +6,65 @@ #codec_id 0: opus #sample_rate 0: 48000 #channel_layout_name 0: mono -0, 0, 0, 20, 320, 0x58b9a88d -0, 21, 21, 20, 159, 0x6c9c4b4c -0, 41, 41, 20, 148, 0x0caf4b5d -0, 61, 61, 20, 139, 0xc5624226 -0, 81, 81, 20, 146, 0x633c4937 -0, 101, 101, 20, 153, 0x3d0b4f93 -0, 121, 121, 20, 158, 0xe5c55641 -0, 141, 141, 20, 156, 0xf2fd50ef -0, 161, 161, 20, 158, 0x93b15410 -0, 181, 181, 20, 157, 0xb6f74f5f -0, 201, 201, 20, 159, 0x9aff4957 -0, 221, 221, 20, 153, 0xfc5f4aba -0, 241, 241, 20, 158, 0x01e44f70 -0, 261, 261, 20, 153, 0x227149cf -0, 281, 281, 20, 155, 0x312f4cf6 -0, 301, 301, 20, 155, 0xafc54bae -0, 321, 321, 20, 151, 0x7b4252b3 -0, 341, 341, 20, 155, 0x29074a75 -0, 361, 361, 20, 149, 0x82c44bcd -0, 381, 381, 20, 150, 0x55c24eb5 -0, 401, 401, 20, 156, 0xf71d4f33 -0, 421, 421, 20, 153, 0x9b6c4ae5 -0, 441, 441, 20, 156, 0x75954e51 -0, 461, 461, 20, 155, 0x28ff4ff3 -0, 481, 481, 20, 153, 0xc4424969 -0, 501, 501, 20, 154, 0xfbf94cc8 -0, 521, 521, 20, 155, 0x52c549af -0, 541, 541, 20, 150, 0x6f1e4b7a -0, 561, 561, 20, 158, 0xabb45566 -0, 581, 581, 20, 157, 0xe61d4a99 -0, 601, 601, 20, 159, 0xf45d4fac -0, 621, 621, 20, 159, 0xcd0553a5 -0, 641, 641, 20, 156, 0xdb244e63 -0, 661, 661, 20, 154, 0x78654c52 -0, 681, 681, 20, 154, 0x9f804cc8 -0, 701, 701, 20, 150, 0x1fdf4c80 -0, 721, 721, 20, 155, 0x1adc4f89 -0, 741, 741, 20, 155, 0x4b53511c -0, 761, 761, 20, 151, 0x8ff2546d -0, 781, 781, 20, 158, 0xb7e34f1b -0, 801, 801, 20, 154, 0x4d98474b -0, 821, 821, 20, 154, 0x14924ea8 -0, 841, 841, 20, 153, 0x8d4752bf -0, 861, 861, 20, 149, 0x74785066 -0, 881, 881, 20, 151, 0x36c94a4c -0, 901, 901, 20, 155, 0x82904f3b -0, 921, 921, 20, 154, 0xd76b4a45 -0, 941, 941, 20, 159, 0x9fec548d -0, 961, 961, 20, 154, 0x9a084dcd -0, 981, 981, 20, 155, 0x90a54ac8 -0, 1001, 1001, 20, 324, 0x8e34a2f5 -0, 1021, 1021, 20, 268, 0x10f37203, S=1, 10 +0, -7, -7, 20, 320, 0x58b9a88d +0, 14, 14, 20, 159, 0x6c9c4b4c +0, 34, 34, 20, 148, 0x0caf4b5d +0, 54, 54, 20, 139, 0xc5624226 +0, 74, 74, 20, 146, 0x633c4937 +0, 94, 94, 20, 153, 0x3d0b4f93 +0, 114, 114, 20, 158, 0xe5c55641 +0, 134, 134, 20, 156, 0xf2fd50ef +0, 154, 154, 20, 158, 0x93b15410 +0, 174, 174, 20, 157, 0xb6f74f5f +0, 194, 194, 20, 159, 0x9aff4957 +0, 214, 214, 20, 153, 0xfc5f4aba +0, 234, 234, 20, 158, 0x01e44f70 +0, 254, 254, 20, 153, 0x227149cf +0, 274, 274, 20, 155, 0x312f4cf6 +0, 294, 294, 20, 155, 0xafc54bae +0, 314, 314, 20, 151, 0x7b4252b3 +0, 334, 334, 20, 155, 0x29074a75 +0, 354, 354, 20, 149, 0x82c44bcd +0, 374, 374, 20, 150, 0x55c24eb5 +0, 394, 394, 20, 156, 0xf71d4f33 +0, 414, 414, 20, 153, 0x9b6c4ae5 +0, 434, 434, 20, 156, 0x75954e51 +0, 454, 454, 20, 155, 0x28ff4ff3 +0, 474, 474, 20, 153, 0xc4424969 +0, 494, 494, 20, 154, 0xfbf94cc8 +0, 514, 514, 20, 155, 0x52c549af +0, 534, 534, 20, 150, 0x6f1e4b7a +0, 554, 554, 20, 158, 0xabb45566 +0, 574, 574, 20, 157, 0xe61d4a99 +0, 594, 594, 20, 159, 0xf45d4fac +0, 614, 614, 20, 159, 0xcd0553a5 +0, 634, 634, 20, 156, 0xdb244e63 +0, 654, 654, 20, 154, 0x78654c52 +0, 674, 674, 20, 154, 0x9f804cc8 +0, 694, 694, 20, 150, 0x1fdf4c80 +0, 714, 714, 20, 155, 0x1adc4f89 +0, 734, 734, 20, 155, 0x4b53511c +0, 754, 754, 20, 151, 0x8ff2546d +0, 774, 774, 20, 158, 0xb7e34f1b +0, 794, 794, 20, 154, 0x4d98474b +0, 814, 814, 20, 154, 0x14924ea8 +0, 834, 834, 20, 153, 0x8d4752bf +0, 854, 854, 20, 149, 0x74785066 +0, 874, 874, 20, 151, 0x36c94a4c +0, 894, 894, 20, 155, 0x82904f3b +0, 914, 914, 20, 154, 0xd76b4a45 +0, 934, 934, 20, 159, 0x9fec548d +0, 954, 954, 20, 154, 0x9a084dcd +0, 974, 974, 20, 155, 0x90a54ac8 +0, 994, 994, 20, 324, 0x8e34a2f5 +0, 1014, 1014, 20, 268, 0x10f37203, S=1, 10 [PACKET] codec_type=audio stream_index=0 -pts=0 -pts_time=0.000000 -dts=0 -dts_time=0.000000 +pts=-7 +pts_time=-0.007000 +dts=-7 +dts_time=-0.007000 duration=20 duration_time=0.020000 size=320 @@ -74,10 +74,10 @@ flags=K_ [PACKET] codec_type=audio stream_index=0 -pts=21 -pts_time=0.021000 -dts=21 -dts_time=0.021000 +pts=14 +pts_time=0.014000 +dts=14 +dts_time=0.014000 duration=20 duration_time=0.020000 size=159 @@ -87,10 +87,10 @@ flags=K_ [PACKET] codec_type=audio stream_index=0 -pts=41 -pts_time=0.041000 -dts=41 -dts_time=0.041000 +pts=34 +pts_time=0.034000 +dts=34 +dts_time=0.034000 duration=20 duration_time=0.020000 size=148 From patchwork Thu Sep 1 21:24:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37608 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp545568pzh; Thu, 1 Sep 2022 14:25:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR73TpZ3kEsKQmNULMD/BDnSO+Bc3M9qDeRqLVXG2MnJznNZIer3OOmSwZMPveiVeGCVF5II X-Received: by 2002:a17:906:8442:b0:73d:a2fc:a87 with SMTP id e2-20020a170906844200b0073da2fc0a87mr24641142ejy.625.1662067519910; Thu, 01 Sep 2022 14:25:19 -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 f8-20020a17090660c800b0074168953071si207916ejk.866.2022.09.01.14.25.19; Thu, 01 Sep 2022 14:25:19 -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=Hh7rHAe9; 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 D4B8668BA30; Fri, 2 Sep 2022 00:24:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2098.outbound.protection.outlook.com [40.92.89.98]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DB36968B9CE for ; Fri, 2 Sep 2022 00:24:38 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QW1tT3H6wguxFZeBBzQOS+eTEedwvqfBnVPd1FotBvBFWs86AHgkxHNGrrTKaKwb0rV8bDoVznNUw2AzK6pi8EWGMXvXuu4rdskLGxknkcawQZDQVD2tD1wG9czc/Xo7af8oLKYvlv2J3Uz7fwNRFKGHf+xTLQU2LKX8ibfSTVJnE/UQfICIBaG1sqQ+EdXKFxS0kLcqIkR6JUtb+S/SukEjF2ySEtPHc5vqOCPx5V4i8Ma/9M6Xf93raevLRZUDkDB9fG8BEAXniSaqSP7Xjioz9Lp3zNwNUHSm+MsAMB/mh+e7EM3cWZV2OViqdh0pHznFYM639aUgISna/xoCFA== 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=nffGefAeoSeM8TW74hL5cJEpklNy4t7uXpQbaLICLEs=; b=fhnqhrRIxvWwAcMhnVVegoeQePiwldFwEbMlaC9EahVzBx9dZjI9dKLN9jrVI3dL3qLAxOZUae6q/W49dUOwYFB+cwvLwdAslMXl/aYmk36arHzv/fmjdP5LZGzC6KjEB5G/XNpFqJmg82xUo/I4GVAW6igB/DwnymQl9/bKf8tSoNmYkv6pEmg+7f4tbjDg3qLNK/dh+NmltEwl35xzZco2iLqNg3PKqlNxhh5FV5wcanMnCS3q5cPn3HbQTYS0FRGZxqPmPCvCu9dF7LL+rESsZFdqRVsWUzCcc43ruZ7Xbo55iu6LKlvABd4U0oheVJVuhoiaqS47DPHfGdU4OQ== 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=nffGefAeoSeM8TW74hL5cJEpklNy4t7uXpQbaLICLEs=; b=Hh7rHAe9IDUWCzI+m7+gDATA3fn/8IxPuQJKYk6otaiLcRrsPzia6dGJIIOpNgfdPx1QqrujnmKiD2SsQ2d60+YQtcipolMd9bQ/y8TWHAD8fY66iP3A+ew2ZXszpNW74w+x9ElqH1fO7qQqv7uEA2XPdThhwlqrFcCKqTPv0+lWVAhYUXewU+SGFJrBlEes1GAv9g6guHLh9PHtbpKhonhdcGs2K5vjTBaaGN8Ykx64D76zMZGYm9ZeU3jZG0AAtfA2mRBnsRcnrAEu6sIoeC/ullf1G6IOQOMPTtR6sVntvxtQGY0qrO2NfK4sWKRqJSqG/4uQZy2zHkE9LTe7Fw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PAXP250MB0424.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:287::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Thu, 1 Sep 2022 21:24:33 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::90cc:8832:55f1:c7d6%7]) with mapi id 15.20.5588.010; Thu, 1 Sep 2022 21:24:33 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Sep 2022 23:24:03 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [vce5EHngXwP1gh1pt1KrA19tQISe9L58] X-ClientProxiedBy: ZR0P278CA0185.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:44::18) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220901212403.2622789-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88af06c8-a678-49ad-3cd8-08da8c605cd5 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nBJnOPH7CaP06/PjPoSCFAMMmOgs74+fr1pKnMi8Z7RwG2Ri15NUciBxV6neYn2tOzzgA1qlhsgn9qRnEeohSz/kCp45I3PN+aUs1UBetfV3FB+mv6zfravgK8bMbUjpaVuY/IoARxd6ZFtutvVlh+kyOJRHp2wVcF3fjSuh23/6OJshLiO3V2Rz4Ya/B990ofUN6i+S2w//ubdXMvh/llllYyW6S6+7qOnTlkfSdMuj82RcCBVQL0XVlFlwjUd7oUhwmIw56lVRGai7tU2ipLz1cglKRGdr/aXZgc6F4+5HdShEG7FQ6RPJQOzS8svwbuaQKefwC/kQmWkiH0q88GtbtritcFuqvtMeTbbeJwInp85O7i8N8QlGyv9aUQfUPjcy9tcwZGfC0kjzCe3HZwQ/jvlBsio738UF+NmLwlmzDw7vArOTJ6e6PFoH1wlFKISvhoZ5XfuGRwOvF9rmkwF4coCSKgNj7i5CMzNimMq4I/sj3ipZu57QYWjOZd0FX4mCxNjYLW+Xpgue9b3ws4d4FZ8cAPPzq7Rmlx+/g1/u4IlfB3bjwmfXFykYazEO397Y9fwEmQxk+8et2H8Kle4rnygAQmjuayffOZbAyRDR8WSaTcMPKSSG/qJcCehgYEGUGIwvbUFND1OZRHJcXmcjUmpY4Bk/3neEaEHaeN8pkqqScUMLLHjVVI8pIRG7A8nNk+7Oe3k5PtMZczaThjuCZ62rhzUazkJ7ZiXlD6oSwR1Ic1TQq5jQFAuC67sBtj0y43nYM7HV+Mfw8oDvDs X-MS-TrafficTypeDiagnostic: PAXP250MB0424:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XfU3omWMPeoTFAGW1AQ3L4z9V3eDJD/4UeIpi1TqyrezSgST4CsLFNCgy/f3XxJlI4ZZEWeA/uTZsjl1Ylt8c5KdJM9W7q5wKGvntjLqOuWyT6cxMmJqI7NWrQ29k7rDX2Cknqd4MBODB36UvmfF97PikI3AvW7FhhoQn2I2MgVw4LTWfhDG2onGa3sa2tfCKclDEPmTg9Lh3ARD6S9T/95Knb8JOp6QVWLrtPq5lS067Agk+ws53tCwSg1powREEHg2/KFHklxtZDPEPf5BumdO5McQIiiiEaOP6KXKYa/9IT46oilE+og3Ek4o429yFtOMSD69yVHzicCLMNbkx77Qey96Y0aVopqjtmSi4znCDluQyCCsy+pjXaVPxxeiN6d3qkXy2nHznbj6fH8gJKf346C97WGD/HPBxyBfLwcTeS2ARaYmxM+Ay/sFNuH3a/0hkLdsmHCf7vtalkymJ1N2ixXvr8mORO3OTX2ld2wMc0kERFnOCoc0bM4xhctnmJD5Bm7WsLi8Vwan7XxN1fqMSSaxkmiyPam39ki7W41w092RgH7UX7c5LIxQrRiC1O5BZBHz7MjLbldMp/4wL7wvrU1fl2B5GN++Z/Dnbi2R207asSQ7AEZPfyUPPYs9nBGEhEzfcug0xRkMYmiylg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fPavJatE44XeKR4Cb41+cG5wVzjLGmBMm8I/oYdb5fdwCsKa1xfIMYAPjrqxWGnGtVkV7kb9cKtsApsBeEHLYkLsDu/5a/g/0pNcWhlxZGHeiZTA0oCyq1H6kImHqV/4w+WTnVZEVjBB/2NQ6Z4cN1WiDkQiR4w+JRPNb5uQyj/ZSXsBKyzM5TWnB3bLojKh0eqHf0mbhtK2PlaX4snG+53fzbPRyHYgRPyhiEVxHZy1zpp1gnVDcuBhjhMECrO7nvvUtk71Ts+e+CtOYVRfjZWHeHseajMppYoUCe1qm+M/BEAD6OS2qMt2P3gDWGuART+5x7F0/ILxaVNJmZ7Mo4sYlbCwG/2Lg6kesSehKDnA75DIkQUw69rX588t00xa9Bqf3rsAYaaaRgoyIxjXW2JCjdyUOVLgAeTuuib4aonc5ktdkF0omAy6xRG7Q/jQokj6gJlRKAaImSD/pEijQYfL8Vb4NYCJBTDIErB5CgeX0X4Tdny/kewDXtcbkeVSNy69aG3cYNinVvUv+T5BTEfXhGjEeWfEAw5RB13R6qYVgW2h805X3xsK449YZd759i8vYJ4eovxGLEFaMcOFtOzBHV4KIQRVWM/iy1iaDv0fCqbNYbqy+RrLS6aWyoVEqfYqkz+Wj/tzegWiHF6JcEF53xdvfkhdxn6LSE0NJQDHuxkBVouuKQXZosZR2l5s2eA8rtWgn59wrsElI1/n6EajXmAkqZ/969YqNTVIpXRCsxsOtGuzGK0lCt+m7572lWFviZz3MSSTpSccSWgZYL8QllAruxDIlzfU3xTL9SpD08XLmYn7FRfH5+uT1KkSssGdT39D4L4Cc8R1y+6Tt6WfJRd1Vsj/cvyWkEWygEywgadVrQJyQ70mmOaNm4DdbhTxgLNse8dRuXAOvsqU84d5nxccKT4lyDF9LHVOBFnH5GccaUgq/qUWAUvb7mHYJ0164dou03O66jgueeYck9O6tGBP7LWwa898uSzw9hgnOsHf1g7b3LSaixt3MzGH04VyBbxQeJRohmqvs2ycnURTD4xQvxKB+Q8DsB78KaQ4BRmAnHUhldkx5bPxU66C5iJQDZtjWAaviGqwdcJhDX5gEr8tXE/S5HX89iO4mF4MojU2EdvhFNjJ7DQoTmRJgxW1ZIzcc0kKaA6UzYWTX5sRFEUCjrX4VUDsmAjuIGxww8Ir1YaUMIb67qxz5xPjc8KRhoOeHZ5Et0bG5m5KALAGwEMz/HurQg4OdlYhnuD4MMU8maWtokVRpFWNTAYe1H4ACO87R7iwqRv2zw/z001ly0QVHq3Mf+W0/c3ga90= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88af06c8-a678-49ad-3cd8-08da8c605cd5 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 21:24:33.0932 (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: PAXP250MB0424 Subject: [FFmpeg-devel] [PATCH 8/8] avformat/matroskaenc: Write CodecDelay for codecs != Opus 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: 9j3JiDASzmI1 The field is not specific to Opus. The mp2fixed encoder signals initial_padding and is used by both the matroska-encoding-delay test as well as the lavf-mkv tests which necessitated several FATE ref changes. Signed-off-by: Andreas Rheinhardt --- libavformat/matroskaenc.c | 2 +- tests/ref/fate/matroska-encoding-delay | 81 +++++++++++++++----------- tests/ref/lavf/mkv | 4 +- tests/ref/lavf/mkv_attachment | 4 +- tests/ref/seek/lavf-mkv | 44 +++++++------- 5 files changed, 74 insertions(+), 61 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 97dcff5607..ed1ad5039d 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1828,7 +1828,7 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv, break; case AVMEDIA_TYPE_AUDIO: - if (par->initial_padding && par->codec_id == AV_CODEC_ID_OPUS) { + if (par->initial_padding) { int64_t codecdelay = av_rescale_q(par->initial_padding, (AVRational){ 1, par->sample_rate }, (AVRational){ 1, 1000000000 }); diff --git a/tests/ref/fate/matroska-encoding-delay b/tests/ref/fate/matroska-encoding-delay index fb7909fe29..8dd3bf59e2 100644 --- a/tests/ref/fate/matroska-encoding-delay +++ b/tests/ref/fate/matroska-encoding-delay @@ -1,5 +1,5 @@ -df0524cac5393212ee103c1d1221f4b3 *tests/data/fate/matroska-encoding-delay.matroska -961215 tests/data/fate/matroska-encoding-delay.matroska +b933b7b94de55ae029369312d48d8649 *tests/data/fate/matroska-encoding-delay.matroska +961221 tests/data/fate/matroska-encoding-delay.matroska #extradata 0: 22, 0x32ea0490 #tb 0: 1/1000 #media_type 0: video @@ -11,67 +11,80 @@ df0524cac5393212ee103c1d1221f4b3 *tests/data/fate/matroska-encoding-delay.matros #codec_id 1: mp2 #sample_rate 1: 48000 #channel_layout_name 1: stereo -1, 0, 0, 24, 1152, 0x724077b8 -0, 10, 10, 40, 237628, 0xeff25579, S=1, 40 -1, 24, 24, 24, 1152, 0x80625572 -1, 48, 48, 24, 1152, 0x7d7f4dce -0, 50, 50, 40, 238066, 0xb2265f41 -1, 72, 72, 24, 1152, 0xa6725739 -0, 90, 90, 40, 237723, 0x00d7cd24 -1, 96, 96, 24, 1152, 0xc9e85398 -1, 120, 120, 24, 1152, 0xda1287d3 -0, 130, 130, 40, 238290, 0xbe18b18f -1, 144, 144, 24, 1152, 0x1c9a6102 +1, -10, -10, 24, 1152, 0x724077b8 +0, 0, 0, 40, 237628, 0xeff25579, S=1, 40 +1, 14, 14, 24, 1152, 0x80625572 +1, 38, 38, 24, 1152, 0x7d7f4dce +0, 40, 40, 40, 238066, 0xb2265f41 +1, 62, 62, 24, 1152, 0xa6725739 +0, 80, 80, 40, 237723, 0x00d7cd24 +1, 86, 86, 24, 1152, 0xc9e85398 +1, 110, 110, 24, 1152, 0xda1287d3 +0, 120, 120, 40, 238290, 0xbe18b18f +1, 134, 134, 24, 1152, 0x1c9a6102 [PACKET] codec_type=audio stream_index=1 -pts=0 -pts_time=0.000000 -dts=0 -dts_time=0.000000 +pts=-10 +pts_time=-0.010000 +dts=-10 +dts_time=-0.010000 duration=24 duration_time=0.024000 size=1152 -pos=1232 +pos=1238 flags=K_ [/PACKET] [PACKET] codec_type=video stream_index=0 -pts=10 -pts_time=0.010000 -dts=10 -dts_time=0.010000 +pts=0 +pts_time=0.000000 +dts=0 +dts_time=0.000000 duration=40 duration_time=0.040000 size=237628 -pos=2392 +pos=2398 flags=K_ [/PACKET] [PACKET] codec_type=audio stream_index=1 -pts=24 -pts_time=0.024000 -dts=24 -dts_time=0.024000 +pts=14 +pts_time=0.014000 +dts=14 +dts_time=0.014000 duration=24 duration_time=0.024000 size=1152 -pos=240027 +pos=240033 flags=K_ [/PACKET] [PACKET] codec_type=audio stream_index=1 -pts=48 -pts_time=0.048000 -dts=48 -dts_time=0.048000 +pts=38 +pts_time=0.038000 +dts=38 +dts_time=0.038000 duration=24 duration_time=0.024000 size=1152 -pos=241202 +pos=241208 +flags=K_ +[/PACKET] +[PACKET] +codec_type=video +stream_index=0 +pts=40 +pts_time=0.040000 +dts=40 +dts_time=0.040000 +duration=40 +duration_time=0.040000 +size=238066 +pos=242368 flags=K_ [/PACKET] [STREAM] @@ -81,5 +94,5 @@ codec_name=mpeg2video [/STREAM] [STREAM] codec_name=mp2 -initial_padding=0 +initial_padding=481 [/STREAM] diff --git a/tests/ref/lavf/mkv b/tests/ref/lavf/mkv index d9497a0a64..d54c44a647 100644 --- a/tests/ref/lavf/mkv +++ b/tests/ref/lavf/mkv @@ -1,3 +1,3 @@ -17e637fc06015fea86428840418ffea2 *tests/data/lavf/lavf.mkv -320403 tests/data/lavf/lavf.mkv +0934e35639b6735c1e26595e8f47ba70 *tests/data/lavf/lavf.mkv +320409 tests/data/lavf/lavf.mkv tests/data/lavf/lavf.mkv CRC=0xec6c3c68 diff --git a/tests/ref/lavf/mkv_attachment b/tests/ref/lavf/mkv_attachment index a8cc075bf1..ad96424098 100644 --- a/tests/ref/lavf/mkv_attachment +++ b/tests/ref/lavf/mkv_attachment @@ -1,3 +1,3 @@ -3855fb336711517b32b0ec41e8505b4d *tests/data/lavf/lavf.mkv_attachment -472553 tests/data/lavf/lavf.mkv_attachment +d2708709bdd6817d9cb2b475fdfa903f *tests/data/lavf/lavf.mkv_attachment +472559 tests/data/lavf/lavf.mkv_attachment tests/data/lavf/lavf.mkv_attachment CRC=0xec6c3c68 diff --git a/tests/ref/seek/lavf-mkv b/tests/ref/seek/lavf-mkv index 6b64367802..8ac0354164 100644 --- a/tests/ref/seek/lavf-mkv +++ b/tests/ref/seek/lavf-mkv @@ -1,48 +1,48 @@ -ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 651 size: 208 +ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 657 size: 208 ret: 0 st:-1 flags:0 ts:-1.000000 -ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 867 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 873 size: 27837 ret: 0 st:-1 flags:1 ts: 1.894167 -ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292283 size: 27834 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292289 size: 27834 ret: 0 st: 0 flags:0 ts: 0.788000 -ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292283 size: 27834 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292289 size: 27834 ret: 0 st: 0 flags:1 ts:-0.317000 -ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 867 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 873 size: 27837 ret:-1 st: 1 flags:0 ts: 2.577000 ret: 0 st: 1 flags:1 ts: 1.471000 -ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320124 size: 209 +ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320130 size: 209 ret: 0 st:-1 flags:0 ts: 0.365002 -ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146835 size: 27925 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146841 size: 27925 ret: 0 st:-1 flags:1 ts:-0.740831 -ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 867 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 873 size: 27837 ret:-1 st: 0 flags:0 ts: 2.153000 ret: 0 st: 0 flags:1 ts: 1.048000 -ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292283 size: 27834 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292289 size: 27834 ret: 0 st: 1 flags:0 ts:-0.058000 -ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 651 size: 208 +ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 657 size: 208 ret: 0 st: 1 flags:1 ts: 2.836000 -ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320124 size: 209 +ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320130 size: 209 ret:-1 st:-1 flags:0 ts: 1.730004 ret: 0 st:-1 flags:1 ts: 0.624171 -ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146835 size: 27925 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146841 size: 27925 ret: 0 st: 0 flags:0 ts:-0.482000 -ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 867 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 873 size: 27837 ret: 0 st: 0 flags:1 ts: 2.413000 -ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292283 size: 27834 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292289 size: 27834 ret:-1 st: 1 flags:0 ts: 1.307000 ret: 0 st: 1 flags:1 ts: 0.201000 -ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 651 size: 208 +ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 657 size: 208 ret: 0 st:-1 flags:0 ts:-0.904994 -ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 867 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 873 size: 27837 ret: 0 st:-1 flags:1 ts: 1.989173 -ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292283 size: 27834 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292289 size: 27834 ret: 0 st: 0 flags:0 ts: 0.883000 -ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292283 size: 27834 +ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292289 size: 27834 ret: 0 st: 0 flags:1 ts:-0.222000 -ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 867 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 873 size: 27837 ret:-1 st: 1 flags:0 ts: 2.672000 ret: 0 st: 1 flags:1 ts: 1.566000 -ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320124 size: 209 +ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320130 size: 209 ret: 0 st:-1 flags:0 ts: 0.460008 -ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146835 size: 27925 +ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146841 size: 27925 ret: 0 st:-1 flags:1 ts:-0.645825 -ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 867 size: 27837 +ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 873 size: 27837