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)