From patchwork Mon Sep 6 20:20:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30050 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp4059374iov; Mon, 6 Sep 2021 13:20:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYYxV4nlI3a2n0UY8Ozdp7SdhTqAwrmadCX9AvzzzJwmYblzmmFLDvK6U3e5A5nCrpHL/t X-Received: by 2002:a17:907:1c8d:: with SMTP id nb13mr15676553ejc.155.1630959646140; Mon, 06 Sep 2021 13:20:46 -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 k9si10613278edv.565.2021.09.06.13.20.45; Mon, 06 Sep 2021 13:20:46 -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=siJ4rllg; 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 0F55368A6E1; Mon, 6 Sep 2021 23:20:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065050.outbound.protection.outlook.com [40.92.65.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8968F6897E7 for ; Mon, 6 Sep 2021 23:20:36 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bPhA/dUDvc6GjHQwH+wk6S/w9f6qwXDebKW1VzvCi77ZomxARKidgitwQY8htHUlcHVX7yMdWamkeobKNjZinZn5K52ZpTx2Ssh3qBWfFl9rxwco9QCDYfcgn6/KagNrokZMbp/k84TTUI3RnpAN9xXOZ8BrultifqL209DxHdDh8wFhts90esiLfumXeernyK6/sKYJGqK3iz20gau1cRlPWQ1xosyshhYREbMSmOl4qx/MTIWjKieJYvZlFn4Kq2JAn3TmPJKJrKxRnABnngOoSiqHARBKpai8aT1xBAkU8miEYIbAgoxQDxu0+O67C1w6Azinua69FjlkATs7fQ== 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; bh=SIg0xOIsn01+0y2U3Fe4T0/7qWbNlvBiEvgFYqHqo6Q=; b=Kl9yqvsJ8IzozAEvhWqcdapz7geyr+H5BvnrYV7/8Vaq2PP1tMaB9gzid8oeCFmiIeTqS+HJVsriE3p1tMH6ciy0ZAOJ5NDT+QyI+nmDOIs15LSivc3kUm2pzOWXHPQBVdPwXq+kz7NWxtktTpER94mmTQpKIgF1IQc1QSkhIXoWL2167OnyJOir8XhWkb6/pjST6CO8wVY+NEscplQLkaq8Jw7bc/gxheG0VHnM9u6yG2Ij8COX5Eaz0l2ZPiIaOWy3BtneT6OCPRimHB/HaRGCDmmvXBcIE3wxiMJNb4jfwu2qwMvREFtLB9BSRpiR8wo+EhCqLAs2YLkDySrl7g== 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=SIg0xOIsn01+0y2U3Fe4T0/7qWbNlvBiEvgFYqHqo6Q=; b=siJ4rllgFUjQq3C4NfDTMgcD6v9eWLvpJXIdTdT5wjtF9wB72uzhqqkwVhdbB1KCrQyy46A9g0u+T8Zy9iq/DkoREb7cBTAXQcXGc/TM/NS0UldFnAxBaV9tafpAl7gKoNfu3WM0Jic5QInsZorFRv6YVxZ94ZMv+c/e09nnlvuVsjenrGVZrWmy7NlBBPPf2DqcJH9QRku99liDZ1pqWp7QmikSWtUX1AfRyxegHZdEVittbXo1tIGfyRfJzIKODFF5mk2nWaWWV4Stv0CKYIpyv0+5dUFXwHfQH0BaRMq/urevFnRdK+OJ+lyBmIuCG9jOZHKssZGiN3W+lbR7kg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM5PR03MB3010.eurprd03.prod.outlook.com (2603:10a6:206:1b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19; Mon, 6 Sep 2021 20:20:35 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4478.025; Mon, 6 Sep 2021 20:20:35 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 Sep 2021 22:20:24 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 X-TMN: [WouC1XU2seVqzzdW4HJxET32v7Vr03uw] X-ClientProxiedBy: AM4PR0302CA0019.eurprd03.prod.outlook.com (2603:10a6:205:2::32) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210906202028.306700-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM4PR0302CA0019.eurprd03.prod.outlook.com (2603:10a6:205:2::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.19 via Frontend Transport; Mon, 6 Sep 2021 20:20:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4f6c9fc6-2e72-4c53-12df-08d97173c86d X-MS-Exchange-SLBlob-MailProps: EpEO96k6Wok5Hcuorz3BfdFq0HeJQLttK0EpQMHFEbKZdvwoGb2f42gwHPAfNLRbi7Dw622pxDCnG+OmhoNaW7uyjFB23nc43BrlctByOWd2c79zuRLWRbRmTLRIid/xjYJDg6owJ1RiJmW0Yfnyhv83kC1YGI1+lwoOAQ2O1sQeQ2Eh4+JYXWOompniJeKDrLqTWVOOcqhKmTKdVkGE9ZuuuQgU6MqFeK/cba3wUt8v2X7HSTIgbdNj0B6w4sd4nG0pupaBJMDKm9ca1S/DeKf2q1Ourj15xAZnj4Tm/nFBc9vSi4fYPygHgrRaW65BLxw89BORgSIfSJIlmXj3YPzgFC9M1oZEA3g30a2eSCLlc/BLDTB3rO5x4i0ujT1uro46tBg+LQs2EMbira3X+bhG8rmnJb42KF+iDAtFrph7RhdfB8KP66dE98rMMFsJbfT5/l9Ks/0vTkl/Qw+c9K9AqROYR9aYzL4XeZ3Mge1PLAYqyN+ci443hD7EZvwMrLAoS6+NWfxqfmIubFIpMgYouDoDqQyjwkYncRykyYQyVOrlK0nueqdblFvtEuUhaZXPPDS8SWfVVjxuSIWXoIQF7+ashkBNf0G/zF8gUcep690XUY56Db3cAtHMzR0lH+zLoD76u7aDx80CBtPC2AH3TMIElFq4S8gG9iRJaNHdMCbMkmU2qjt8EZN9WjtWC/73TsTuC+9GTdesmxscQw6Mb61Hm7qqdJKf7LTdyYoAZE6HvpLFLxALfnij/YBA1E1iWTSp0Nc= X-MS-TrafficTypeDiagnostic: AM5PR03MB3010: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9jqMqwyIgwEgB2R/NF92ZxVRG87do36nqmkBTaZyTgljlA8PZr2hOYYPvTdVlbqMpAVMXBvdMUmYsJLs9bcveFatmpiZtzWT687giQ7sVuIotfNYjb+rC1E9xO/uMtzkOLpy+pNZ6XBeYIEumq92NPigzmM+9rv9vFqbXHRY87D/E+oIzKFfy1efPUBkT2bnjc254VyEDIwEqP9iNkAVjaO4aE09WPdk/MkFy+k6BufaAxQuGDuWELPx3cQRTD+6NeT+IimBDJl4cUEc1e8KlfWBo9vzSFjPTCFuZM15stqqmE7acvJJd0C5JFWdyy79sh0ugL9kwbIQ1Zwz3hj1TfTJlITOuzgYLIM5sORzV8J4qzhq1G+9z/5QSPKOl2t6qfPZbDSDJ6mQ19BzdS7QWC4k8ZUjm7YeMxBXT47M41WbB7Xe3SGRSK+C7uW0aY1V X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZdxUQrmjwa+z1sWlU9U0xyEIpRuZKVis+h30N+DbFhTvpMG+vtj+RpzMbRFOaBFnNf9f0E5ZevC/AFedAYlXo8rl58grNgbOCcfQY7ifJ3Z8hPQrCQpJwrbWoX18snIu0Nk/O45TQ65rthYa6u2PWA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f6c9fc6-2e72-4c53-12df-08d97173c86d X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2021 20:20:35.0053 (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: AM5PR03MB3010 Subject: [FFmpeg-devel] [PATCH 1/5] configure: Remove null_bsf dependency 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: IOJnt7a4H6Yu Unneeded since c96904f525afcaba756a5ce8511a3ee1aa9fd2d7 (a bsf-list with zero bsfs is used since that commit). Signed-off-by: Andreas Rheinhardt --- I used the (always available) av_bsf_get_null_filter() as the fallback in target_bsf_fuzzer.c; although I don't think it makes sense fuzzing it. configure | 1 - tools/target_bsf_fuzzer.c | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/configure b/configure index af410a9d11..a2b834c760 100755 --- a/configure +++ b/configure @@ -3726,7 +3726,6 @@ cws2fws_extralibs="zlib_extralibs" # libraries, in any order avcodec_deps="avutil" avcodec_suggest="libm" -avcodec_select="null_bsf" avdevice_deps="avformat avcodec avutil" avdevice_suggest="libm" avfilter_deps="avutil" diff --git a/tools/target_bsf_fuzzer.c b/tools/target_bsf_fuzzer.c index 56f011ad21..73bf4bdf0e 100644 --- a/tools/target_bsf_fuzzer.c +++ b/tools/target_bsf_fuzzer.c @@ -54,16 +54,14 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { #define BSF_SYMBOL(BSF) BSF_SYMBOL0(BSF) extern AVBitStreamFilter BSF_SYMBOL(FFMPEG_BSF); f = &BSF_SYMBOL(FFMPEG_BSF); -#else - extern AVBitStreamFilter ff_null_bsf; - f = &ff_null_bsf; #endif av_log_set_level(AV_LOG_PANIC); } - res = av_bsf_alloc(f, &bsf); + res = f ? av_bsf_alloc(f, &bsf) : av_bsf_get_null_filter(&bsf); if (res < 0) error("Failed memory allocation"); + f = bsf->filter; if (size > 1024) { GetByteContext gbc; From patchwork Mon Sep 6 20:29:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30052 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp4064091iov; Mon, 6 Sep 2021 13:30:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTEN5QPBG6Ur1FWmFRQb4Vpxu8QvUNPHSY/jiV6nI9N0ve5foPLqnmijQt1tYNNKDr51uS X-Received: by 2002:aa7:dd93:: with SMTP id g19mr15083608edv.262.1630960201515; Mon, 06 Sep 2021 13:30: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 h7si8877205ede.265.2021.09.06.13.30.01; Mon, 06 Sep 2021 13:30: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=r+z49BYq; 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 E029A68A6F4; Mon, 6 Sep 2021 23:29:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2078.outbound.protection.outlook.com [40.92.91.78]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C81E68A60A for ; Mon, 6 Sep 2021 23:29:51 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=diPt6UuNlLnY4ouNUTgIbuUR+9/4PIOE9aPybSRwlo2pdj3FwITQrhBSHj855E5TFDZ05yQ1bZhpzS2TVP65FlzeQsHLbRJQ222PZQtoHcqpJ47ccpd8nF5aflCTU4L4kpC5OBhJHmqVersgyevAf5wewKQdBCLsEmlY9rTAlYHitA1dRsWGEfUCgEuq9HtNVw1/HuTuy5kUcgETm9b3xY1FHmEHqgIqA6Ha5O3pfHTbhS2xzuaNLQDSFJxuiVPpn2RyyviWZ7P7c+mac2Rck4DB2KUluXZuTy3kG3dV99yj26s8udNtdhdZ7ld3+SC61pMJP8ojtCNUj6ZHkOCxfg== 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; bh=Csl22mKvbQ0RGqkVdoY9pqhMt5BsOo2fRyNo/V/1/g0=; b=IfzVPBnctCfHIOqZxDXN/AMY+Qpcl86f3k/8SZtrwjLzXxE9FwjSKnqXKiVD2W4Hpf/tXRvxAP/MeZnQzJ1KBtfzGB/l16Zb3IYUmv+NKVWWbHXYTpHkddCDUXEXUJUcqlfqLvLDAQHjt7HY8RAM6zim0zwZyG9ewH21VEo4t8KVKJ7HsZn7iSDrs/V2DsxnU4fR90YBksjYFsRivx7hUTJlf44Jmt3oXJ2vzjuv+NOhPVIdxcmek/5zDyPppW7gLqrgsRpaED24DkMBk2pC5FdU00BpMESikt9l4KilG+S8BiP9bpMY52VdST61lXjZ+3QMfO/BTJIBqU6aSTeBMw== 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=Csl22mKvbQ0RGqkVdoY9pqhMt5BsOo2fRyNo/V/1/g0=; b=r+z49BYq01dIiaNgZFFfUsxzf+4xadygptt2j218T+P76p/YrWlym3FfnIBncNG5pyES/osAT7YbOns21oRg38fISBzWodPsxq1AHlM/3lNDJu1XTx12QhornM4txlmFE+4UhT3a4ZAUwQ5cbLRUHzTXCWG6cxOVqGel1upd/jl0SezSOa4JQlF5kZNddEhY2YI8z5vHsWZxJGhuHNl268+Z0WGNJI4ep8DcD7JRqp92oPAyK5nVbz0ftxLlIQ53VRa78cLgWQDkCL7COpn6I2gnJjis+br3ABDXqtv+5o2WLraiHJnHg825Omogpgo+ORKlpw/g/DALY4x63vrZLg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR0302MB3400.eurprd03.prod.outlook.com (2603:10a6:209:1d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.20; Mon, 6 Sep 2021 20:29:50 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4478.025; Mon, 6 Sep 2021 20:29:50 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 Sep 2021 22:29:39 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [eJfovnL4wHtIZQ8nbF21TnFnp2xEY7yB] X-ClientProxiedBy: PR3P195CA0014.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::19) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210906202942.306993-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR3P195CA0014.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17 via Frontend Transport; Mon, 6 Sep 2021 20:29:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c5fe6eb6-8ef2-4c25-d3bd-08d97175133a X-MS-Exchange-SLBlob-MailProps: pxu8rxgqUghX9xqnxI6BunTTX7RJxOQ4q4jM9xEJ8Io7g4jcC2fD19W+R3InJy7CST2SKoQabVs/q51mak3Fd/2X14Vve2d/vql06eTwClR8rmYIHYjndNFtH0ShX03+u+d8pUu7VJI1aY9SSs5waJSCvC4OitzVsJPj7aBwhC07669/oASaymtQc3gxtovg0+YW4pyztu8RqWou9t6NZ7sIiIcbQuu4w0WfQCtnuQcg5wB+jV75KtlGw3Bs3k7u4RDcyAQBhMHFb9/eA5eRrYG5vryQLdnU5hsy4+iaJFNafRlSKHrA4lzBdIY7HVobyUPd63So70zj7nm2NcevgbhfUVgdVeMw1Qzz+RQj0jYcbfqjchpfwbxTBsAj+f2B3mF5Nkk78Z4NPGjSA3uoX5VkEICV3SHm31ORLoFQumwwnLsQfIDlY2jBSmLhhZMaLM8v8J7o8Xc95KcE50a0ZzC30GYro+RM9SjI9p2jowSpt7eYZcJgUtvjC8eL8SgxFy/usuQqoRbNU6Z/ogDAA6TtJDg2YTM6DdaKDja2hZN3CjvuJgu8CR/OVOTCklU0yslyEwFEttKSg1Fpmvp2wN2ZMFUQgKzjRhWqrQNxCBadto2yVra3whzQtcBRymNYlCy8WRZRzJRgEnTShq5MTyV2zRvj9a5wGfElWp6fs6GQMzHjFGDFsjXcH1kBKCljTuywUVz2YBk8q73vawuI3A== X-MS-TrafficTypeDiagnostic: AM6PR0302MB3400: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k5UQq9K95Kn3h0sUisaCIZu7wQ6Tq5fwvXLOJKpcnUzrIi9A352059FnaOHlh9XHzguzHCHeGFf4D5qT7XDoWy08hIKMwRtzuXytQv/KmiNPjJZY2NqPZFGDpp4lg1/qlHjoA6IJvJ6NVa6fqPOtgAqW7aWAizXJF+4eYzzuvGNpEbhRy60PCHhYfvsGvmIAie79K3et29ViNuRnCPU+rwDRII7dN9r7Ddr+rOFoctmeGOTaPPEly5r83bW/yjXljkV31N+DxLdLetuatFUzXfj62i7NPhkhbPvbUUTSkEUqn4SiGfOzo9DcSkdV41GfhkD1V40EHd0vyzVT2UGuqhJAliAkcyt16UB3Om4Zm4P1T8Dwi+CvrQ1ZCI2rajJCwiHi1FqfUpTxO0+75/tFSmR+/91r7zOLZk1V7QKPfp3W6JH4slrdVPJ8+Mt/T5+E X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PQxpDWGuyMeThzQd4fXSjl/2ETdStWGh4U9Fe84xPkn3jksEYbB85dTMrfSIMGjA79GzevuX1hR+Tm53qOOnKXNPW26ARnsV/PXKzhC1msL9KwCOssEuo86OrqufHBJsEtN7DHuNM7FcG7mlpRq4uw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c5fe6eb6-8ef2-4c25-d3bd-08d97175133a X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2021 20:29:49.9750 (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: AM6PR0302MB3400 Subject: [FFmpeg-devel] [PATCH 2/5] tools/target_bsf_fuzzer: Make it const-correct 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: F5wwf8q2J8Xc Signed-off-by: Andreas Rheinhardt --- tools/target_bsf_fuzzer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/target_bsf_fuzzer.c b/tools/target_bsf_fuzzer.c index 73bf4bdf0e..d6aaee3bd9 100644 --- a/tools/target_bsf_fuzzer.c +++ b/tools/target_bsf_fuzzer.c @@ -34,7 +34,7 @@ static void error(const char *err) exit(1); } -static AVBitStreamFilter *f = NULL; +static const AVBitStreamFilter *f = NULL; static const uint64_t FUZZ_TAG = 0x4741542D5A5A5546ULL; @@ -52,7 +52,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { #ifdef FFMPEG_BSF #define BSF_SYMBOL0(BSF) ff_##BSF##_bsf #define BSF_SYMBOL(BSF) BSF_SYMBOL0(BSF) - extern AVBitStreamFilter BSF_SYMBOL(FFMPEG_BSF); + extern const AVBitStreamFilter BSF_SYMBOL(FFMPEG_BSF); f = &BSF_SYMBOL(FFMPEG_BSF); #endif av_log_set_level(AV_LOG_PANIC); From patchwork Mon Sep 6 20:29:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30051 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp4064218iov; Mon, 6 Sep 2021 13:30:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPJuq+TFyfon7Lq1sWcE1DEZ6fxj29y/FXjUe5Ym2L9koxGGvGqkovXi30vOG/b5mkjj4k X-Received: by 2002:a05:6402:2909:: with SMTP id ee9mr15114315edb.377.1630960211214; Mon, 06 Sep 2021 13:30:11 -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 u3si9643683eju.666.2021.09.06.13.30.10; Mon, 06 Sep 2021 13:30:11 -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="EAgGQEt/"; 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 0A4D068A60C; Mon, 6 Sep 2021 23:30:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073014.outbound.protection.outlook.com [40.92.73.14]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 31FA168A704 for ; Mon, 6 Sep 2021 23:29:58 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kn4E5YdYgzjubCwUxPxFvUQ/DFCC8c15yAEKjcczTI367ItZ6jgtseILTocMb6BnDZgoeM+G4DCqFDa+5/EZ6AtIitCyNZNMU8+/MV0vy2RnP0xUoXUGphXIE7VplBldztrue9MNLAbpADZSgcmmGhSQjxpPm0AxjGzj3nf9tJCAMDohxDdK6U3Cyj2SYbJ+M56Q4AqoHlxKiEP/Wv7iMRiybLw2fJs/EvBrW+RV7TTLkq1HoI4rIl4O0RPsPIP79Qk6RxZLm60JW3uKQgc1sfnkp+wLSQaLfMx4h7MQ1yYvohrn8/yWaCFe/2EdX7AL4OInYyGL1bkjXGjl6cN4yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jURbwzCGGbZO5fJ0bIZUACSBzwmd6oLVnYhlLq00Tmw=; b=Ewoe+/K/Tg9Z2GfK82BdgqpGbfd+Z9edUeFBS7j+g+W1X1gsuf1FL7Doof94g0TxgwHRRkq7C5zEBfPRzx7z+mjvZ9Zj06/rTxuriG2FBKACLuaMwoSh0/4h2vvLGr4Op87DVvxE68C0yeQZ1RT+zixoOeCJPSh2XMiih72m1iDn5HbRJmWmZCaZgGinZpUibFVQyietvVkdAycI7s4SbppnKYj71f0ed9fkQXcnEE3UQ2INBzDndr/itUKwqw9a9hbpPdfRimgKQHaYNdrBbbaJp1spPmNoiwYEPQJJqS9vWgZvECbnUVqughN6+zwHTRqp+gRDoafOVlOSq80OZg== 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=jURbwzCGGbZO5fJ0bIZUACSBzwmd6oLVnYhlLq00Tmw=; b=EAgGQEt/pPPhWdtnW52mFAyDTW0D60FNvihbd818dKvUpjfC/Jd/nQt2lVlDAZrpQS7NTJu7YYgA5xbIeaQ4fDe4ruAsH7V2cQl96OnqzGp0ncnvKia1f4vwwEfUda3HDRm1ZXoY19CXqucSZImtZQSGdWe4Klf2Z//zkskhPpfO8brDt8wALBtljC/5h30mhS/OyEx46MQXxBugIJRtt0H94Ri7bwHs00YPCY2dwqFo9glnEkyyhPUZCEhaBrwezQY1pO1jXqQ5iR8FgtnCDrkRgsuO6RNrsZqwHKQnO6ioDdH8rJ4h3Adk8NbhnmZ49Ne8cLV++mMAIQayjpDhjA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4950.eurprd03.prod.outlook.com (2603:10a6:20b:87::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.24; Mon, 6 Sep 2021 20:29:57 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4478.025; Mon, 6 Sep 2021 20:29:57 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 Sep 2021 22:29:40 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [T5Z1X05dKvp+UKbAlIcw3UWJ4zn4o7Q2] X-ClientProxiedBy: PR3P195CA0014.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::19) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210906202942.306993-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR3P195CA0014.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17 via Frontend Transport; Mon, 6 Sep 2021 20:29:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d68eea98-aba0-4153-ac6e-08d971751774 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNWfiyriVhNa5k3709UAIysHSKNg9IPnkkF1HQWm5CeIgAKcjA1Yh2VB8cr+9pVjYRi96oWzW+JnetgClkVMDX+ymsHN/xlbLZqCd1lKyXFiriF3YuP5Y+IHEDaLgDL8vAQwZcdmh8UeLTXVwWyVlIgrQMWgGJAO3yAyqMGethID1jmLCxgjyIDTqc7nAFBpF2XG67oqczNbjM2J9J72z9P6iciAla48tgPOIbFgMjdzmTQK1klnSnRLCIwGhjqTQhI8AzDduS0X3y1y/XBO2V6eXp9h6/yV0fo21m+PAoGsJXPuUukw5NSAUY+B8UrothYJFr6+IQPdFLJ4gVvY3PeTW+XYGY+w4hEycdf9oBjtJMKjWbdCA6AIaXuslXveXJ9td5Gl4W+WMNzbSuK9Iftsa70Wro2pdMFpayeRrxLqmDNdYXmVjKyClZLpAckAnZ4e88/fZlMxooZCAXKrdLBWhR448hNE0w1B3VPN03sEObGE64QjW8i9dtz5g/Ze9geiVmf4I9SWMvJdcMEWbJug6bVtmPXsdJLLNhshWVdzSPm1o5N/+8IzvXFOrMOlHMQkzd+9bDkLG8GcQRsqgLGlOzX8tRGOujQzGpUaLWXSFd5gJHmDip7OxBC5VIquzJK14BHowdBwyoODEmJD+BxnThDNfiZRhiSpyQa5Ar6L6cQuO8x0PSB42xSgrY4ncLL2YoCUZoBFY6WyUlSnK4CXV7fOqaB+fiY= X-MS-TrafficTypeDiagnostic: AM6PR03MB4950: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JDlmFkMatAknJmhi1ZI7ZOoO1PPQZpZ12N3rKQ+Ta1d24mOu5Kkp6PGc5NGynJ7wtPxWaUKaN3SQcB7yjfStGsQ3nGQC9OK8XDB0MMTkIBoKZHYDSIka9WSVBTAFEZUyu0fWKmqSCquK/qfq20o/z8nIr8bK1Vca0+RfjjSuTT7SUSrMD2X/ZS+/ythsRG1nNDV64DoizteaX0nBmFOiQs/EmiANxIRNm7pOLU24SHnXSq6C1Nu7Z5hRqn5EWOT7yhw3V0sQACf9GfpH3/D4XY9SgrfRclWMHKVXCLzKekFDOzwfcsgzVvtdw1RrJ54dqNfgUlZ1d4irfTx7Uw3jHMrNGGkGgsdkUjU2avzo3sr4OIJOk96Ac0VPe4/j2avszD4APpO2VW3SjiEiwLzvZGBd1I/+V1OUD9cQShOfYAI3bD+kD60Lc2rW2DgQFyrD X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dgpD7jWpYrguMifjE9W2zM9KXasnkdKpekyphNz9OapaIG9zgdUeLfWsTnPMTCe0bA2SBoeLI+lv3mPJI7R2ERPQnEmp+NTe7ma+rkD2MpZ/dTL/RxVxH0eIMwFS5NSmbk6HYGf9Oxi1Ex2f3aVMOw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d68eea98-aba0-4153-ac6e-08d971751774 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2021 20:29:57.0560 (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: AM6PR03MB4950 Subject: [FFmpeg-devel] [PATCH 3/5] avcodec/bsf: Use null-bsf for passthrough when available 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: L4omh1CPekAG When an empty list bsf is used for passthrough, there is a check for every packet in bsf_list_filter() before ff_bsf_get_packet_ref() is called. Directly using the null bsf avoids that. Signed-off-by: Andreas Rheinhardt --- libavcodec/bsf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index 57034ce646..3420885e5f 100644 --- a/libavcodec/bsf.c +++ b/libavcodec/bsf.c @@ -18,6 +18,8 @@ #include +#include "config.h" + #include "libavutil/avassert.h" #include "libavutil/log.h" #include "libavutil/mem.h" @@ -544,5 +546,10 @@ end: int av_bsf_get_null_filter(AVBSFContext **bsf) { +#if CONFIG_NULL_BSF + extern const AVBitStreamFilter ff_null_bsf; + return av_bsf_alloc(&ff_null_bsf, bsf); +#else return av_bsf_alloc(&ff_list_bsf, bsf); +#endif } From patchwork Mon Sep 6 20:29:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30055 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp4064324iov; Mon, 6 Sep 2021 13:30:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNGeenKe+8MLwk99AKRvkXBPTOV/19sJ/Q+uiVknwY/nuj3y6z3Y4FjLcQjZ27u/jqCuvW X-Received: by 2002:aa7:c44e:: with SMTP id n14mr14978635edr.66.1630960219919; Mon, 06 Sep 2021 13:30: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 z16si9207861edr.217.2021.09.06.13.30.19; Mon, 06 Sep 2021 13:30: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=sb919+T5; 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 3BBBA68A71E; Mon, 6 Sep 2021 23:30:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073014.outbound.protection.outlook.com [40.92.73.14]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5815B68A70F for ; Mon, 6 Sep 2021 23:30:03 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jJEk5WDSYGWauAx24WGJXG7D9HWXL+amEL/gUhRHMv+e3XsMXxcfDJeSZqykuP3y/ccLAhP9tw1SS/+MwQr/xrSKD1YH1ClS5J+2HFT4nZqB7vIF9UFOf9koadzifvRpWzAsMSsTA1f+sL5l2GK+e3w+YDR0Y3ve4gRtrww7sb/TQFIT8oAeqnT48huj6IxVxnd3hcKHcIuruivfpz/cUdwZ23x0PrZe2oYZ5Ski4XDV4gi5aoTEV0oI65GqruccCg0ZuLv7QT191EDhsElyi5PpISj7rUq7/Sajk0xKmON70D92hhkFjC5ImI189F9qVfdVHh2sVocA0DvPPXb2Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/dj+3PjR9TX4lO6MVI6i2tLrMNtarVeuujuXEt4+lpU=; b=cxMHccdNsljx2Q4KjiArelxjcOJaM3qPBAwggj7la12wnLjKl3sq2GjHRB9NioJGSb8wbk8h7dpbvVuJ8xj8+4fSpc/LZzRHGqwMwICWe6saPWSxGBuQAftyn9/SQrJmnN/OLaAzfbtW1wIGG99FaA//DBNC9k/agGeiATTk9k9uXeeyRzeel0/1wMwKCWxFuHxpg6jqXrzBP6brouaJObHL2Mj/5JUciOGGVsI99QzsCmQisKdgqyYfaijji/fWssncYPLaPvs8URaotyAl/+z1t494D0D550h3Ara4i3raT4HophW5ga8q9qbj/Fo+WYAAWo4DufftkyZsRhq9/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=/dj+3PjR9TX4lO6MVI6i2tLrMNtarVeuujuXEt4+lpU=; b=sb919+T5igkQNZhEqp9uNkFMIC1aqhJSk+vaheFeCXZw2KhYScigEUwGrptAjErUOIEpH6pnOdkOP2jmdE4DIdsrJl3uXTCjJDA3EX3ZOY7tErxVMFwDoKnI4s4XCvFwPFt1SFMOQuom0LiOVGf0M810UQEMX9xiREUT9l1KGHi5aqwKJXvHmay2jFkD04UVdmDawazmuQY1DThc0BFpLJ71gtr+nnxsa7CXiPgVWGbS29A3YXRetNzRwamC/Cqo7P2OBhpnZHWuLCkKpSdq6cuYDAYwzdG9xWEWENlpjmDmjoQsmRXx/at+1oWUaZCu1Vd77O4wai0a2zvYwR6ndA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4950.eurprd03.prod.outlook.com (2603:10a6:20b:87::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.24; Mon, 6 Sep 2021 20:29:58 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4478.025; Mon, 6 Sep 2021 20:29:58 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 Sep 2021 22:29:41 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [OCDCPjfuw3h03JnCY0VA1XXHlE/e9aFj] X-ClientProxiedBy: PR3P195CA0014.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::19) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210906202942.306993-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR3P195CA0014.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17 via Frontend Transport; Mon, 6 Sep 2021 20:29:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9590365d-1701-4d5b-2d24-08d971751895 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiRm1SWGrcVu3/zL+lgvsppzjTL9cjQRX0f0CZno9sTE7+eUeHsRtSaRNUnFMSdjzmFQFhFKgKyyfQryKnVQ+Ux2KX1Jx2n5BI5z1nJB+jrO+utlGdapn/4uCUe3f1C6Na3AkcZrSWyIo1Q6neurqMDxDSE4AJ9lgU8Lsl19iDNoj5TXyA02LxDmPd9riv/cA3e5GzZjeyVU2g73qKrRGcePEglp64XeX/i9D1Es69sl1y2dIFIWTciaiul95oLFXmY8TY9tRyL+8gLxTvmb86kK+dcvutiPeekZ8xJWYADlsfBqrx6ZxSwZdL8CMl601PtpthRvGis62RLYGvYp9l6E8nIJFXEK48wYv9ptgsfMVDfx4tbAJxH7P8XNCyzN7NB5NQzNTXKpNgR2yK1QiCS5bg6h5oyRiykYkj2ipF+hW6omFe9rnWwutZMM+DtMYjY3ucvSBH2J6jYIII0LKh83sKVbwCWjfYYvnYWhgh++QJSDILXFrUZdwdELhy67T4X+Lq2HFNSFQ6lm6CqZP2eyozCm8s6t7zUzd4K1y9LxkkeXrVP0l+BXU3epDusZWkZJ9T0RxSr5X7oQuDU+9HvIrKOR1vSTBQbzWnbb70bRrWZK3WnxGph7UdjxmAiJggN/i53pP0S6kIlLksPShK8WfZdObXcxkApUvvlQu9l85MDZz4dmYyMszv/5C6p9WWIbjf2Eprr7D+t2VA24eDWY/IR3URAPDj1cRc2vGp0dTb5xTDFaPiA5y2YGJyitX9o= X-MS-TrafficTypeDiagnostic: AM6PR03MB4950: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MteV/C+wMvyYMdIi23YJm163ta2WBgsHb6xpYIF45X26fTBqolIfw6WD6QffcgeyLMbznHCSRgswTfc3YgPvrKn6zgfa7FNNb8zsBLKO3oeRzdBkHpV4nKnXiyUismlqE4hFO8YNx/nEHpZvP+DgTqmGiorkEYtV4MP4oDcoYC/ZwQ4QCcuasRfezzxyy/4uhMCZMWaIukFFcL6+nBByrYqSpvxFpAzgj9E507nY5csD/JK5AsMNsh1cZ8v5D0gqTfrWv5kQO8QltpLVueVQkf1N6gJs2NwLquVEV/c9Q5gjYVX68KPPIj7c0OEsjsEbCeKlkAEvRphw8qlr55I0oyfXchLjqbvZwZ6y2Fz1LiVfDV0ytxh2AuPkhZzT+LREwZ3L6n+RevS+B/ZuKJTma6/v+m/JWiMTFcaLFP2fhzZjsx59YPx4za2SmgbEbW56 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: svgTq421vrfvt2jnFpbqIb3EugPBkTsR5Xy+GgI20hWCMcaNJW5bOdI02EK5ffALCdIKP8w8zkOMtQQgfg5R6qcoqgOs6e4FE68KpeMXAvyJiO0nlxydI5vGoIAk67HMc9DMHNCCBU1RV6km8cp3EA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9590365d-1701-4d5b-2d24-08d971751895 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2021 20:29:58.9398 (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: AM6PR03MB4950 Subject: [FFmpeg-devel] [PATCH 4/5] avcodec/decode: Remove unnecessary av_packet_unref() 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: FCjErEAZlHkN The buffer_pkt is always unreferenced after being used and is therefore always blank when avcodec_send_packet() is called. Signed-off-by: Andreas Rheinhardt --- libavcodec/decode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 643f9d6a30..4def801516 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -587,7 +587,6 @@ int attribute_align_arg avcodec_send_packet(AVCodecContext *avctx, const AVPacke if (avpkt && !avpkt->size && avpkt->data) return AVERROR(EINVAL); - av_packet_unref(avci->buffer_pkt); if (avpkt && (avpkt->data || avpkt->side_data_elems)) { ret = av_packet_ref(avci->buffer_pkt, avpkt); if (ret < 0) From patchwork Mon Sep 6 20:29:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30054 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp4064408iov; Mon, 6 Sep 2021 13:30:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRUid02K54OKzcTSeh+ZtdkwEN2k1yCU76vy3uK3ZUvh80G2+7no7N09/9vdVzXdgEo53K X-Received: by 2002:a05:6402:1d05:: with SMTP id dg5mr14906766edb.375.1630960230033; Mon, 06 Sep 2021 13:30:30 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ds15si9745914ejc.506.2021.09.06.13.30.29; Mon, 06 Sep 2021 13:30:30 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=LjdxzsSE; 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 4B16168A753; Mon, 6 Sep 2021 23:30:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073014.outbound.protection.outlook.com [40.92.73.14]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7E61D68A755 for ; Mon, 6 Sep 2021 23:30:08 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PxTO8nolL8TWyQQOhoZSn7Ev5ldhgPm2BVcKwMLHf+x+jPeTsRT1vhDqI9IljBclQaaaSdaAcZpmSQqfJ8Fp5bOLPDOJ7BZ7qpAWDKojGPugbSOAWtxeU6hZ6bAY4TVmO5HpiA/4l6hpMtnQU6rw8VMiG4wfZaWGo1dSZ8Ha2g5EuM5lWcB95ZDN378X5V/LUdTMG2nZcN/Rlm1pDiUmP5pAWBlLIpRY7QuraQW7gsG8Pf0GD6Q+rKZRMWXrTa+SsfX5gX1XQa5Dj7EUKWNU4ygbIsOuIqraCI55YBSNDPQVP6v8ODAI4ZU5XKYeXyhQp3T9EusdYqco03fotmVKRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q4UdXqeCHH1PCtspkKL0loU8+P+n5Dtha5kP98Y+mkY=; b=KKCDHtkrqZPnpLfMYG5o+1njvaNwgta3F4SSoSR9D20KM7E8XQVJgSdN5eO/G2c+KQxAfwqtDHTPYg1o0bWz0UFo+SUUfyIBInIipAQyMdj3vVO1jfFRvcmW2O0TXXzhG+HOWKiDhCcDibUDg8rul59ggG0IdNmzAFROmBmfyh40eUemSXa2YxOwafIZuU8q/pSF+oQ5vaQYvOeYwu5tktaoLdn/4AiC5zDBoqrSKqkAZ/cNjZdPK5RjhEAjNaal+CwO1HrrB9L/r+HCoZSZ4cOPzdv4kZGZEUnTbeXfHZqovDlK0qv2oXgyFAEYYVbAdkINyJ4y75vUzlUsVLTENQ== 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=Q4UdXqeCHH1PCtspkKL0loU8+P+n5Dtha5kP98Y+mkY=; b=LjdxzsSEFkVoGBUQ49Eo1zu0KV0TOL9s0mSHTMvFCZ/ugRHfHW1Nt12JWuEVJ9+xhVnIN+nbLZ4Y8k3pTUw6xPcsPBexrg/lFtXuFHUyzRKMVFrl6rE8fPs5ooDdMT5mizuDr9vgTv8e6MfiMiZ2hdeCMWIaerYDi27tmuqtyd6eJSzXHDAV98t9aXqX/07VH+G+dpX4p0Zw1qqKmTzHP66JMx15/Y3jYvI78McbrOr9um4XbvpZojxRoishqyZygXZnOkzbKQz9FTBpEJ7nsCfOIdkeVyE28UruXLRGbVALh7kIvX5MAI6nUxHc2KePJDbBF3TFgO1Sg02v+NY2jQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4950.eurprd03.prod.outlook.com (2603:10a6:20b:87::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.24; Mon, 6 Sep 2021 20:30:00 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4478.025; Mon, 6 Sep 2021 20:30:00 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 Sep 2021 22:29:42 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [bEAB3j/YVnDdnCLCm4LS3sen5B2DFsJ0] X-ClientProxiedBy: PR3P195CA0014.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::19) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210906202942.306993-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by PR3P195CA0014.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17 via Frontend Transport; Mon, 6 Sep 2021 20:30:00 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ea72ef3a-073c-4e57-1711-08d97175198f X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UKb3QWS1fMq2sXm1TdI02LjAbYmWAKCMaE31lTGc/OaIi4j107briBiia+ZeKpaVgKmnQT7CaQ5ipEI2FDW9ATVKksaVYXBi7osMGbhdee/s0L52yaYuutEN0EB8MmdS7uDUwwLMWKiLpF8qxd2Ufr+E+UJK33V0X0KrECQEiTxmzfNjJSxEkRjoRF6YMm6NE7AB0njFDpeeRUGzny9R+Pjb/mPFjFtXQCXRqd10Q52MyssApp6z7Vo5HwG1nvFQepd28tUE9L9ZGQRjPrI7HfHM+mu/Zwj+D9Bib2RuLXFYRc0zt8B51cayJg1npR7++SMkri1HtpU1nr6fuGJA8ZqRUHGFzyzhKIpWMNiJ15KNgk1p//py00bPzN2sD6joFEQZ0T0MOlMWLF91Ayn26KpQaVVYscoG4A02iIk3sfklGuDolJ1K/zmTqWwInUtloCmcbZLvp69ew6aueIpbf2MNEDwYeCj0Hj7l/+X6bzF+8leTXyECxpsRCJWtK0Tl4vXp3hoHhfp4/zRgf3+aNalizHOAK8FhoS9x6nt1hpbkkixn/zpKXaLj/NFLbjZ62l0B9dML+7IHv4LCiHUTN+InJ5nsqzMSRlBPyKmdbMhyc7i5/w788J6ltFNiX6TVHffnzfUX7VlQY70zwcdFmlR4U0/EpAu1cPdo4AbKCFw7IMocAMTJAaix10cQtD3/ANgpSVV4Z2iOQ== X-MS-TrafficTypeDiagnostic: AM6PR03MB4950: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HC7k2Dx6qRrcYlSOV7q1AQrx3s0T34rOuBzdPD8p4Vr4nKEZNiHppy5aPgLXF/+iDFBreazh5tLrxbqwAgypr69pIqnE2dpiVz3/ffNcC/ufKWPS777Nd99mnUhgL1M8k3VL1hgPprYgqTZDRTK7C/PzzcPNLHT9jmym2zfzdMU8jED6doOPydBkQ7XB+AL9KaBWQUSSGOFEnRhbAun4TM4Y/qN1hK/JVWlr1X7u5oZUFDaaEIng2Du0FeV3RdW228mjKQVGf71xGYYi1scFn54d4z3JEusEiG41PM5L2FM31G/M6sw3Kt1NW3n9bbpTC+dHRFxCHGIz/gqaY9oGDOMbBKOR9ayRQbsA96lfVrPt3H7/TtwhG2161oZVPVudSLfUBKga6haxxORcC025gQG3w1OBuyPvNkEfRmJP2Eaj/Khlwt42jeP9PNpC7lmG X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1X+wJSzBbopp1pthQeP13c9N/1KqhDfsFeRgBj4/8D2OiI13u/2o94Je8o9leVlof4Ey1ASb8sMBrIGxSP1nlYUt/cHDm0HYh5I40prJswzG90VovbrBCiCfUCPGot94DxSo10GIskTkMm4qdoWFAg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea72ef3a-073c-4e57-1711-08d97175198f X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2021 20:30:00.5806 (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: AM6PR03MB4950 Subject: [FFmpeg-devel] [PATCH 5/5] avcodec/decode: Honour avcodec_send_packet() documentation 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: iveqwi0X2/OZ The documentation of avcodec_send_packet() states that NULL packets and packets with data == NULL and size == 0 signal EOS. Yet avcodec_send_packet() actually used the BSF-definition of EOS: A packet with no data and no side-data is EOS. This commit fixes this. Signed-off-by: Andreas Rheinhardt --- A different solution to this mess is to adapt the documentation. Given the recent extensions to AVPacket I have come to regret that we allow to signal flushing by anything but a NULL packet. libavcodec/decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 4def801516..6a4b559c8d 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -587,7 +587,7 @@ int attribute_align_arg avcodec_send_packet(AVCodecContext *avctx, const AVPacke if (avpkt && !avpkt->size && avpkt->data) return AVERROR(EINVAL); - if (avpkt && (avpkt->data || avpkt->side_data_elems)) { + if (avpkt && (avpkt->data || avpkt->size)) { ret = av_packet_ref(avci->buffer_pkt, avpkt); if (ret < 0) return ret; From patchwork Mon Sep 6 20:35:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 30053 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp4067592iov; Mon, 6 Sep 2021 13:36:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1xwSuaTT6ljSrYEZ7W7DPEYKeZS/zfn5H69Xaj0+dhllDnexWD5iQhtDLIztcDb3HI6OU X-Received: by 2002:aa7:d303:: with SMTP id p3mr15067747edq.184.1630960567859; Mon, 06 Sep 2021 13:36:07 -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 7si9211610ejq.64.2021.09.06.13.36.07; Mon, 06 Sep 2021 13:36:07 -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=MAGSRydX; 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 BD12368A718; Mon, 6 Sep 2021 23:36:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068049.outbound.protection.outlook.com [40.92.68.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9EB51687F4A for ; Mon, 6 Sep 2021 23:35:58 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EYm2K7bTA3WDes4IvvOPSNMAkKlbqssUgvg1kupYCvIqlO8Kfz8p4OomuxvLeWCA+RxwLHxYmP27awft8njJ3DDt8Ebb1eBppQqGJuldRXXqzWUPRKO0ibLVWICfPAo+56rDw62FQcJ89vpt9aT96fU4AIllHOlLny4Z44QEu5v1QrB2dKRRM1XNzCJHTlMtoP3hNSdzQ31cuZVzeQrNoWw7szTrcniDZtUQLThLrX/kT2JuTWP1BFUrGxcQXHNfJ25y89aYIcJ7CidWUlL5LrCIbFOBkS5PAtvs86o+j7AnYPIXho0FUnlmowkhnccYYzyL2tQoQyR0oZOSpeJRUQ== 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; bh=ZnZQtIHHcu7MR69ykY9FgmQlHFTrElYFuWEQBiYI6Jw=; b=i8JAPBd8R1uwMGacXdrvjrAEs/S39onDNBVkHYiWMCXNcQ0Rc94ZYTIEXbtb76R51Bv4GyESvy3Bb0DX4kUeMJaL7wgBTEpTf0tBQXd2/5o3oX5Si0CbRvZ2QsqopPHO1blbixiZshtARfWhzBvEk4bleFN7pj2wJRQWlxzRZ52WdL9h1mt3LzejCYktNae/ymaeebVrxJRt6km8kVXUT1zm4p9ZTgT3m7e6OMwL3XSj1Ybgw6cMRcxJhjD2odo3iGsPmirYVMkZOVLXSVw1Br3BiJjyf9KJDR3BcR83MBwOjQthvoTmbj8YLQsISZyJ8DEYxcOtqkNSfxJEvrrKiA== 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=ZnZQtIHHcu7MR69ykY9FgmQlHFTrElYFuWEQBiYI6Jw=; b=MAGSRydXe6ybLxHz5nXhLjcd6mqAQ4fRzeh0yeemmv+CoreB3/2pdRcwAfhZjjDearc77Dx/Ns5x2FII7RtTDBiVHIhajFM2dzTdH2Q03dTcIqyg09lmlnpYpLkYnEnS68t0Ftvbn/SbRGpHVBc8wrhhd31f+HsDFgkNT9zgw1CJBimmJEVWEpLOfSq3zVpHztQ1wHTMl6QUp7unkHbHSa7yikUolG1Z+tLe5Rh1KWNv5Jhx5nUWA4brnisWAW9wdJU5NlY/lOU5WpokwidKvQmchnomLdH2VfCBtD4yZeq5kXYJv4mEinGkYdOhXx2ZdrLSSubLhsCcmW0UoVfi2A== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR0302MB3191.eurprd03.prod.outlook.com (2603:10a6:209:19::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.21; Mon, 6 Sep 2021 20:35:57 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::787b:2156:ca99:fe00%3]) with mapi id 15.20.4478.025; Mon, 6 Sep 2021 20:35:57 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 Sep 2021 22:35:49 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: X-TMN: [Af2GK3URD91aSBm4yxnrNUOaR/JD3yOz] X-ClientProxiedBy: AM3PR07CA0136.eurprd07.prod.outlook.com (2603:10a6:207:8::22) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210906203549.329402-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM3PR07CA0136.eurprd07.prod.outlook.com (2603:10a6:207:8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.4 via Frontend Transport; Mon, 6 Sep 2021 20:35:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f8539e0d-fbdf-4813-10bb-08d97175ee2c X-MS-Exchange-SLBlob-MailProps: pxu8rxgqUghX9xqnxI6BunTTX7RJxOQ47zH2TyvFJEGng3r/S+a98hJ/EfNpOqCeJNUAknDkakjA8IOL54K3TnLI4s17VdZ41qKsVIS6lirTyIE4ogvy/VW/+ThHu9Kz86gan0xALC0kfd+4VgLcb4docFJunVjbdyi6l1OxwWQQiGB/eiRRC3xRO5Pfzo1mrqyEmTfkOU7p8+k0rsg1kJ0j9iQ9gy7zi2yXSz7uqSavqZMsKYxxnQcehlHY+hx8cKwpfIFthyjFYkubMLBV87Mq/BR197hxM8eOpnUsiB7sYRQXEpfxvYKZ9SF5R+RqTSeU+xKrku/CBRXr1fw0ODTNWlgAoRXbv+urMeFHhN35XroUmF2lCcWVCcfWbPcL7uyb0gkjsHqn4azeHL48jBkXpWR6GkJA4YuGvsHTRmmxAlae01plWNon4mciJC9Xmac8bHxqPftVLg2Oosh7OxeeLjCX9DDzaA1EMHgEfE+5eXeSlv5ev6k2JDVAMZSui5SuMLWQi46enPXOBqBH5vRalozK+eHAQ6C9NW28MLyBClTxv3cCWSPFG3nDFPFpotCHsEbwrDf2zH8pCOCFciIyMNZmmX+HCYP0nvRcR8XEC6W9FAL27z0lBHfwWyzlQliWSCJPI832J5f4PBNispPrrvd9qvl+9VXyHNEK7LHi6pI3iLuYR+qK03O1X1i+dO/YFP9S74ucWHtb1obvgA== X-MS-TrafficTypeDiagnostic: AM6PR0302MB3191: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zwpecl6S+rhIfXMZUcUnDeHbEn3XpQyDaPJpDTmIA3p2rafTZp6qGmlxtRjfWCAoM8Fu4NN4HR5/J7uQounFDGnNj8zXj6a3piphyTj6KuacGjG8Y8D2BYsbrMyyA8IxNY6hq6BWZVD9VEtFP1SH5MOW0GbL9kl70+XbBd31cBIfpLEWOSXEtc5Co04EgDZyq+kC8bOQkwF5LKurbBLhj7BqOyEEGj3+WNZ5liYHjyl85FXRywj87grN5+QoY8fExhCHI9tQqP9T26NerZovgCj2+T0wHzQW0LCcbFhXnkhsTv5Tf/WnRg2qHIubocbDUiq/l6V9ueVW4n5QD3xF7E4AVBZdlUNXAngV87a89p5cAV6xTgOmw1YaBpFOmdbKLMUCq+fz5YEdg+PIFY0x1YtdbgPouagcGguUbwc74zEnxMtsymipXnQ0YG9vJP3A X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PoZVrxkMOawOQNRNZlhtQD18FyF1GCL7jSdBGGBlAmdkIlwB2nC8gmlbDpECn0haV0B0eP1A4eUBAl2AWbIvLWhbX+CjYMzO4eyIz7925PADHL4r5oLBwGllcjwvklpDv2QqlNHSiZ8SmSOFcgtlgA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8539e0d-fbdf-4813-10bb-08d97175ee2c X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2021 20:35:57.3082 (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: AM6PR0302MB3191 Subject: [FFmpeg-devel] [PATCH 6/6] avcodec/bsf: Unref the packet when flushing 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: zhWRg0RYleVR The documentation does not require the packet to be blank in this case (i.e. it can now contain opaque_ref), but it does contain that the contents will be reset upon success. Signed-off-by: Andreas Rheinhardt --- libavcodec/bsf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index 3420885e5f..212f398210 100644 --- a/libavcodec/bsf.c +++ b/libavcodec/bsf.c @@ -201,6 +201,8 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt) int ret; if (!pkt || IS_EMPTY(pkt)) { + if (pkt) + av_packet_unref(pkt); bsfi->eof = 1; return 0; }