From patchwork Sat Oct 7 00:40:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44195 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp161350pzb; Fri, 6 Oct 2023 17:40:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBo1beFwSRWAax+/fJ/nxv/EmvJo1IW0dbCgSDwHkj/yzC4HZ1lCl37Y1egz5WM9RlS36e X-Received: by 2002:a17:906:3288:b0:9b2:8c37:eb2b with SMTP id 8-20020a170906328800b009b28c37eb2bmr8535512ejw.58.1696639216674; Fri, 06 Oct 2023 17:40:16 -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 y18-20020a170906559200b009ae25613f4asi2099130ejp.269.2023.10.06.17.40.16; Fri, 06 Oct 2023 17:40:16 -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=TKe6DKwu; 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 0F23568CC10; Sat, 7 Oct 2023 03:39:49 +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-db8eur05olkn2106.outbound.protection.outlook.com [40.92.89.106]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1CB2968CBC0 for ; Sat, 7 Oct 2023 03:39:46 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RKJrPbJChtMG/TMDJjrFY5SNvqWrG60PH6PQwBP/ZvhbelGocqSx75+Oki1+xsfXVwm1J44Ay06vxvIIlNsErBHzdLZuAL0jrX32KNek63KkYi+ugKlzn7ciC9M8nsGInUzHAgbJSaSYxCL8SBxZT8RdetGzV5KPAHzCpVUEQTRMfOxYcNXqTHzFC7AMp5QNbPr9HtKg0vR6AFzl8O6H8948t5UFhqCfVzzOe8AEina8DK7lajPkb375BBpZ7Pd/+AK8OOxDPW6QtUQoMNojahWPIOtVQBnm3PmfwO9M6a4PifIvjHWcgBtsINoIm5NQJy1a82kjpAlWecYj/7AC1Q== 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=2wwthfgphhGbzTQqegjmfZHBBj2xl4OOc5+aIU6xJ8g=; b=SoaOkui/QGyjrrg9qgFc2bFXye83XYDEbzMzVBc9LXYQ5QX6FMKkuAZiM3COcj/XQBscma1EDEtjcarCcdIJofigKp0JCR0Qw5Sv9XWFWqjQ+wWJQyujnADrpvuXLxg80V0Vgw3HuAyzORseENEQNQ+SjADeGEcsk0mpCLCpWPYkhz+ifwngTPx+vZUZTXy76FWprToWED/sWrzxdD/Yc6nio3qvW9WqLTjUfNj6/DCt11G0+kl80M5BWZcgUYbt43/4vQ/HXX8V9iHjRHnwFmWp2KXSxBideK8FMGLPhvqC+Dzqh9NUZvdfJ1sA1tCcVaXy1bwMQVd6pyy4Ktg41w== 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=2wwthfgphhGbzTQqegjmfZHBBj2xl4OOc5+aIU6xJ8g=; b=TKe6DKwu3ze4vwmznuCzcY/9+06Yam6+6zp84ZU3+a+aMSz4TND2lGXznF5TDLvt/u37LSEoJ6ZJfmqCMPW2STINXA8ePayc7/dM0G4KA8u59hBa99QTnQyJ/GKCCrBeW+dOaWrvh9ygFFMMzbGUy3QXmgtm5idcgzvfe8RZzJT6iycd10z3L4f25gWcB8r7QZFIftIAaFkptD8ldhzb2rTYGZkCPZIKBXifobkvFphOfl0TySdamokTgItHcDeyLrD24Df0gP6uts7zuOg2/q93L4+9lRBAE/OYIrwK++o5MBU2Zz6kUCmrIKPhcu9qoGKMUkHEIkBi2GN646J1zQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0050.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:14d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.37; Sat, 7 Oct 2023 00:39:35 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6792.026; Sat, 7 Oct 2023 00:39:35 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 7 Oct 2023 02:40:31 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [/8NOu6QkVvx2c0eKB967FyeLLtjcRd5v] X-ClientProxiedBy: ZR0P278CA0154.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::9) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20231007004031.2024778-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0050:EE_ X-MS-Office365-Filtering-Correlation-Id: 86687ce1-f788-415a-19cd-08dbc6cde146 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m7Y2T70WviEOMe0cvFnghnQEEljqM4lF9EIEOk1+Q6uNOkKpfUX0jQA6xg9j22OIFUg8qOuW5prHIsR3zgBItrcW/YpDRatMLKFwX8IyBj70yqPOGke+K5DV0sEU/Cvzx/LIhYtRUPIxws+v+oBmMX+rN+eyex9HgUG0kn9EkXy8h0D0lJyAJ1hgx4mC8g+pGVQRoHqORhKIKeJ34gLyXALNkYrGGysw0ZpBqdLbXjzt3gi8TaI0kjayhILNa38Vnef7aR0UTndmAYXl1MsV79C62gCuOCyaSb8HC5p+d51U8XuN1JOmXqDYnW2Qe0BOaxLeJcYwbH3BC2Xj3li+yKJqWRM2d/Tb+WOQoa9VjYGvJeJ6GU+1KhebIXY3rQBtybWTPMUHJ2YMIKmCPsXEvqhN0TqgVyvelrsa1gkhzMoCDi3zsg4Fczek2W8rET44DT4gQZhQ0MBxjnkiiTcCWu4da1suc23tEPotn1bbdvCbpXULnqADj25HBcTa2R+G42lw0RTHLLbsDujOkx0NPD8mE2jnkV5EvJSNRbFJZ6O2OjetfrSDD2WVX/LxVodbjYDa4XdJDfGS1YrwHsc9zHxYV0+bJjlb5XT8mTSdBipNmVgyCpsZGMRjcmdJs2V1 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6IoJN1QQZiFUAgizPU1o2NEFFaeGbMTJfSlSXMp7hP7SwIw7NGDdauwY5+4cnMdrRpuDawr9vknPw8+Optewi55zc1Cme43qbi5zHT6U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8InygYyf5zv+gCEpnH6xHCNNJ8FitopHGZNzHkmWWjR982+xXa8k3h8Whcfpy+nOCKSGZChSNg5BIgzB9MOM5fRk5IYgf6yUk2gH X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86687ce1-f788-415a-19cd-08dbc6cde146 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2023 00:39:35.6125 (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: PR3P250MB0050 Subject: [FFmpeg-devel] [PATCH 7/7] avcodec/h261dec: Discard whole packet when discarding 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: PHhy7VFs9Rqr (The return value doesn't really matter: For video decoders every return value >= 0 is treated as "consumed all of the input".) Signed-off-by: Andreas Rheinhardt --- libavcodec/h261dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 272bbbea34..8a823793e5 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -631,7 +631,7 @@ static int h261_decode_frame(AVCodecContext *avctx, AVFrame *pict, if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) || (avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type != AV_PICTURE_TYPE_I) || avctx->skip_frame >= AVDISCARD_ALL) - return get_consumed_bytes(s, buf_size); + return buf_size; if (ff_mpv_frame_start(s, avctx) < 0) return -1;