From patchwork Sat Oct 7 00:37:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44189 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp160254pzb; Fri, 6 Oct 2023 17:36:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFsEt9GyHHwPsk0seDKFxAzqztkw3ZFbp5DhRpQ2qSflvsjI10ZkCWUYLQBQja1d1Fmuq3U X-Received: by 2002:a50:fa99:0:b0:523:bfec:4913 with SMTP id w25-20020a50fa99000000b00523bfec4913mr8196279edr.0.1696639010457; Fri, 06 Oct 2023 17:36:50 -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 ca13-20020aa7cd6d000000b00530c46e2b3csi2107571edb.258.2023.10.06.17.36.49; Fri, 06 Oct 2023 17:36:50 -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=rpR++K8i; 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 A794C68CACA; Sat, 7 Oct 2023 03:36:46 +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-db8eur05olkn2046.outbound.protection.outlook.com [40.92.89.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 18E5668C919 for ; Sat, 7 Oct 2023 03:36:40 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bT1HmU9o0AsmeU3KUct8aKD9HVigU9ROwBu2jD52TJWchBGJWp6p1RJiihslvpn6O2OO68Y30vAryd6txqY2LtK6+/rkFWjkNMWHcZpLgOUsCJ02BcFaPAJqobn5qDw829oE8Rujgn/ABYOr5eQqsW7ia4x2b6CTlkDUKPhJNhOcPo66jcVFh1uYqGlzfuFSqu8axuVFSM4og5uArbYw013UsOnfmDn316WkgR4QPXSoiMKzq9QQKFJhtTVqJRdNbvbd06N1SxbARmUlZgspX40Yr9BicmF2P+SCYO1cg1P5XxHCHfYC1NT/oN7SPboPYVotd8V2EplWGAuresoaHg== 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=2GQYN0yh5uqJ81FPRN6LytDTjR3+fNRS2py9QzIXC54=; b=guk/cNLiZO6itk6ZMYE3lviH7I1sjGIw6hQjdXBWYDyLpBQsLROM4KCTYArY5lO90+YZ6YXxJHGLFIqlFmzp2CUcw8p+HbQTKsIgj2s/AMkgC19sntRkVe78X1TOBBVUASInlHbih5W9b5+79EZgtGZ1TIH7bCIECgDi1cX1nXOUkr6QyIwHtgec+/Cl0QO31JVQLmufqEVDPQ0tGmh9FMIkAvUilb/V6/oOLqJUdfhQonixNpC4XY/oyZNBAIMMaDxVpPqVbi2/VijqoHD/8JQaPQHhFFViYOMzPAThK8dx/PGCJnaBmbDpuop1Rh4V5eIzy7b9q50+f5Ude2+zWQ== 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=2GQYN0yh5uqJ81FPRN6LytDTjR3+fNRS2py9QzIXC54=; b=rpR++K8i6DAM9ai40kcnq+QDSwmVx4q+bYY/LDeR1taBnzL82BooLQ+IRtWXmOlYPMRV1gbvwbDP4HFdWdiwa4bNoYVmLXAGu3Xnl+6niyrvXNESbzMMhyt6OPGmt9kznmi1jpKWu47AsKd+cyOJo2p/YYJonj3DgeHqIzVbCuQDJhn3lDOPW2mltVseQixOG49XbT+2VNNyOxA3stoKu1WlzB0ftPksIrRj/iqZDIEosGA8os8GYVKuumrP6dn1oTzQU6AaOnH7ajNNwyIfn2ScCb7k2JsAID3p2o3jqOKVfCFn93FELDU/fYqRjx+C98gWssfMZ9/h8IOZR2FiLw== 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:36:38 +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:36:38 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 7 Oct 2023 02:37:39 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [RQ01e9HT4zBZmapGbOxgFhf0bFXVgQqO] X-ClientProxiedBy: ZR2P278CA0018.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:46::16) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20231007003745.2024727-1-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: a9837caf-2b8c-4d7e-ad31-08dbc6cd778a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +P67pdWF3GpAwE9nuoM0me25wopxlCb5tq3KnabBXtImqqpKsiNYH2RoRn03Y3B0Kz4aXc4f3RVUd2n1okPD13UZQowhhZEM6wAfn1wJLThBz8wFlJ7ItcNEm5DZh3s2/D1CncL8wF+RJkkcY5vv1I73Gl7jsOaoSYt1PaF7RkuNEoLofhSQP/D/l69KybfmN4kWhMBDeBC59VOxOKiyXNI/unI3DU1QFWcxyitBRQmbDbfpPBhe1tPwq1VD/c9i7Vr9Oz0z9yPeLZEIHwgQf2thTo+FDLqWZOnds8RPoB3pNLDHe+XNrOH331gKqZ70xsmzmcH7/wmLnqPQbsbEKoF9c1bEJ3Vy01C1bELNLMSuHJrHH2FoEhx3iGFXUBLOpFz4XRJ1a5tosq1xch73ssX4+aYoz7j0H2sZdFu4oItY8y5K6Sfahgx64lt3jIXCeOdo6CJU2Uas5zjd/HPv0oWmBdu85x7sebj1LPaaIXjHopI8jHBncVRZrw74wwwncfdwxdKCeNq4xqarc2W2wcIpVlR36med0c0PMkuJqpKYUfWcBde+hGSp+CAmr7EivxZNxKqpnUYdLQSm3pdsuLZ/5tsppvEqT0+g9SCqjzljrz7esThAgiNRr3hJNOWY X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vBX3bqFImrUqN8OkQkaCGmTqMTApdkMotQXNuh1VuiONK6O4KZo9PZsQe2ntemY1GaLnwAnSerIg/5pl+cMTRM1GoglzYPnQ5BmdKz5QPGE+C6fkl0xsRJIgDgdVt1W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aIHDeqK5fNAPAiPANmeRAJ5C0z2jaDWD5quChZ0rGgsOhnkILvxDbvvpa+lQFnWIAt21Q X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9837caf-2b8c-4d7e-ad31-08dbc6cd778a 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:36:38.2003 (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 1/7] avcodec/wmv2dec: Parse extradata during init 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: NvU+HMu2a86+ And stop setting picture_number which was only done to not parse extradata multiple times. Signed-off-by: Andreas Rheinhardt --- libavcodec/wmv2dec.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index 469b2c4b2b..934bf56b1a 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -203,12 +203,8 @@ static int decode_ext_header(WMV2DecContext *w) int ff_wmv2_decode_picture_header(MpegEncContext *s) { - WMV2DecContext *const w = (WMV2DecContext *) s; int code; - if (s->picture_number == 0) - decode_ext_header(w); - s->pict_type = get_bits1(&s->gb) + 1; if (s->pict_type == AV_PICTURE_TYPE_I) { code = get_bits(&s->gb, 7); @@ -333,7 +329,6 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s) } s->esc3_level_length = 0; s->esc3_run_length = 0; - s->picture_number++; // FIXME ? if (w->j_type) { ff_intrax8_decode_picture(&w->x8, &s->current_picture, @@ -578,6 +573,8 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx) ff_wmv2_common_init(s); + decode_ext_header(w); + return ff_intrax8_common_init(avctx, &w->x8, w->s.block, w->s.block_last_index, w->s.mb_width, w->s.mb_height); From patchwork Sat Oct 7 00:40:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44190 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp161093pzb; Fri, 6 Oct 2023 17:39:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0sd1TkbTNYqt75r5VM0p2dOJ9UP6ull7N6g3pqbEgEjgDQKmPDaMutHSSUzh3fMRaWijR X-Received: by 2002:a17:906:7484:b0:9a2:185b:5375 with SMTP id e4-20020a170906748400b009a2185b5375mr8995451ejl.18.1696639174813; Fri, 06 Oct 2023 17:39: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 z12-20020a17090655cc00b00991f1a1c99csi2039550ejp.360.2023.10.06.17.39.34; Fri, 06 Oct 2023 17:39: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=UhLC2QDb; 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 E7CFC68CAEF; Sat, 7 Oct 2023 03:39:31 +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 3A4BD68C920 for ; Sat, 7 Oct 2023 03:39:25 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LoiOn29ZwyicEyR9IQ8a83eevNInyt1wrQ2Xv36Hsy0JDPZ0zrLYdSHeuEV6LvzSu5uS/aDstx+F23q3n04JImoWz8QqISuFuLjNQJvBbrVGXDbS7NxEPxjr4jiY8OvNdln2OXfNutOMogg7ojeThXjmgVVorDT1SzUKHuFPvBO6pntahjdSNat6E2lU0+9KrsKgiSjlLUKrY0Z9r6OQmrmwR9LYVPyv624oZwvzNqr9e7gOzHeR2o1wtmotReS2XNkcSRpr6O5mj1SVcNf4RaNKr4Pe5IDWklJZ/Fj3sSSAc8EuHQeZfsXNgjmwFzs+At3hfyiaWJmbVsmYLFw8ww== 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=pVkZQA/tq4hvSzaEQmd+nOUNk2bdRRwtolrVGQLY/Mo=; b=Nf7tH4p3X0kH0ldjLAQ/pVNwHSnibAYdUv7us/TA/q/dazYYsJShc5exCD/WOrRqMSqLAZI7FrgMQqlOKTpvobneusyi7k7F8XzsMrEUoEi6tQXPqhOZdUwiXn7nZdgMpuu9GGVhGhsSc/l+cjOAhXsjApWlA07UsGAT2tOVVt0TVhrandPMVNJKTr5lBPSlpr5vcyNvWaIqxhpM++8hYJY4brXCWDUv1AFxd4hBBIOQy4q4h/u11ewurP4hew1iuDlaOCaDZfwSmUvzRM19RgCrusyLdY7Lnn3219IGHCCAlhADN3fAGds1PKN+8UkDIt+aOGRO4029DL/pxecjRg== 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=pVkZQA/tq4hvSzaEQmd+nOUNk2bdRRwtolrVGQLY/Mo=; b=UhLC2QDbdPJLwSUzNwFh+CqSsa2RfhH1w6Oy7y5oMlsMA3tY/S9MJXymNdo4Y31z/LYpPPU/nFWWMOpQr/qvOVYnfATEyVZ9rWfKg2tnAO7rQHJ9Ns/lvTRDTafDLF8pW2F3s4lW+KUbjYd1qZdMuQW/UmoFuGDQ6EWb4g63vDYonysMR8o5Y0dV9A57o3h/BUW8JiR1YFsZXD2LAxBwwIHRjiJRnTL1LZRI1k7vXjoMMK3qu8mv8d4qvlEpt06LtCtW2lVE8rKKDkqzWqTG8xeuDvQahM2xzYBVKnZ/UED3/MQSLr1No2MTQEeA7n1bvue+LXq/pktK9H+G20dEWw== 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:23 +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:23 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 7 Oct 2023 02:40:26 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [q6E3lGkGx5ZwEzi9cw7wNWAVWg6hxNQ1] 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-1-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: ea2c6d6d-8096-486f-4e1e-08dbc6cdda2b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZfkMAogESYjZQzZad8FUXQQilfHws7eff9Nf6yneYCGQg6o/VxKPyJtlp+4/76J9gtFYQEGJeD/XsAVKy1YqQ0f8V6svDEmBCkGMqOeR1yew8GNfNYz7K39IjQk7Mn0ofkrrGg5UzokNZs1++aDixsRFS3Q1bAC4Dx0PvCtRR0vv+eWvvH4KxLP11hb697OWeEO00FC/VA8FCIUdqYSBlRTqnq4zsSWLycL0utvcVXYtsM+D+3X8LwgMG7P/eiLRQ2cvMXHk0sjBofdo7liajGCckbh2UMn9bfwAMR7LD/aIhxEWzyJiBqYLksACP78kXhfpyO7yPt3BwHCqUjBuWQ9hiGJWqOoCwhLfujqGq20LUrPEEZfIKpGdSc8hwcehp08O0kkNnHOOafey6Mf7pDRxxi0NWT3AAmP63XhQ25UaXXvpOXYve2qM6tO3pnx3GXwla8JzqcOp314wY/+huiSPNo8YRMb+acVw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9T8Up+kcsWAW+NGazCbwJMTkjYN22XrZlI5vLMltRU3jxPpntYBMFQDO/gykW/fSDosStUEzjND65rqoNOXwC0xf1UDVTiJuNp+0fakt2Eawa4+aXi18n5101YS+6zCg/fwbZ/2hyia14k5naCA4QMA0+TBn8IvkGZRKaRKalkhd8nM4h2Dp+q5SZctDRoWelxlgW8xcdbV1xJwuIIsuFmzaHQEqHMnNqLXdaa/Vx+5MD/cXMHUHMR0z4nweoMxxG6VDBZ+kzaNedQpBHPbqRzElys24nIQZ0dRNqW/1Suvmt8VQLJiNN+2v5oLxuncXfHk1RMNGctbRtSufDJmaFgLuBP66Z0H44SLAb1VBGIaI9Wm7cUyVwoWPaiiBgUeAhjAu1CEEUpa9N0/8xu+ X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea2c6d6d-8096-486f-4e1e-08dbc6cdda2b 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:23.6928 (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 2/7] avcodec/h261dec, vc1dec: Don't set write-only macroblock dimensions 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: hA/2otZvfrc/ They are generally set in ff_mpv_init_context_frame() (mostly called by ff_mpv_common_init()); setting them somewhere else should be avoided. Signed-off-by: Andreas Rheinhardt --- libavcodec/h261dec.c | 6 ------ libavcodec/vc1dec.c | 3 --- 2 files changed, 9 deletions(-) diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 447e168c4f..a4e0bf9cf2 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -530,17 +530,11 @@ static int h261_decode_picture_header(H261DecContext *h) if (format == 0) { // QCIF s->width = 176; s->height = 144; - s->mb_width = 11; - s->mb_height = 9; } else { // CIF s->width = 352; s->height = 288; - s->mb_width = 22; - s->mb_height = 18; } - s->mb_num = s->mb_width * s->mb_height; - skip_bits1(&s->gb); /* still image mode off */ skip_bits1(&s->gb); /* Reserved */ diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 534128d6ee..58a50f085d 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -741,9 +741,6 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) if (v->matrix_coef == 1 || v->matrix_coef == 6 || v->matrix_coef == 7) avctx->colorspace = v->matrix_coef; - s->mb_width = (avctx->coded_width + 15) >> 4; - s->mb_height = (avctx->coded_height + 15) >> 4; - if (v->profile == PROFILE_ADVANCED || v->res_fasttx) { ff_vc1_init_transposed_scantables(v); } else { From patchwork Sat Oct 7 00:40:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44191 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp161133pzb; Fri, 6 Oct 2023 17:39:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGF/Fc4NrcHFJaRDr7DclzVFR+JggbgzxfzvAG0Hgj+YiFXBcLEEBc/j7EjKvu362Sd7FRo X-Received: by 2002:a17:907:1dd2:b0:9ae:406c:3425 with SMTP id og18-20020a1709071dd200b009ae406c3425mr8819431ejc.0.1696639183124; Fri, 06 Oct 2023 17:39: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 r25-20020a1709067fd900b009b97fc4469asi2070578ejs.302.2023.10.06.17.39.42; Fri, 06 Oct 2023 17:39: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=ctIH5ElR; 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 DD81168CA44; Sat, 7 Oct 2023 03:39:36 +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 5E72B68CABB for ; Sat, 7 Oct 2023 03:39:30 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nZRtDXEsdCEVy4KRdl/uYWPaf26knExIOafZmQsZXXXL/k9i1IbvyT7Y30STTWNFH3xzqRjwL15TqtYoMgwEdhZA9xcA9q7vYG7VbKsMFwGIbGABn3WWI3abLv2rv0aQpnKV4bj/n7cP1RmBtmJXHwCqZh+B1TvX9yPIG1WsgQXQzzBeH1NRLPRiKcIXs5Y9Gn/y2/OhZ/tmEWm8P6gr/xubvs3MvR+yrfMa4+yz/d8tOC+nQ1y27WAbpZpiBzr/lqni5Q08YSeOGQdRri8kkqDxwYCYOoPASfPHkXmtEQYhEopvSe+sy3mC+xZH1Xk/LFqtjjcIkbjA6YQTzG8C/w== 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=mbBfBJN8pCgxDC7PFoC7ApfvOkHntX88bGnYQbhUUGU=; b=CC7OCJaQWfJb1gc5srRU1fo1QRH7tB8F6o7KNoTT9p7oJDMhI3+37ShNlZ/ku9oANn4VgQJBLtNNZOGFW3sMvFkht2OOueiePIGoXzEhTmWMKabf4fQ8Cu7TYXaIA2mIXXXtYPrPOF3N67mxw+HoENA2jsaaZme9vfaEsPFRb4A3ZOOMI0aTDq0Z9zPbFYUEKEZzOBanH1pht3nX+0Czh76dNNtM/B+q/zfJH+wpk5n8t6qE3u6loAen7RnWeVaaNxZPR9nlWjWklUgt4bf6gY1XRJhHBeMRD5+ypHrf4Rl9ZhaP1EACDI+odGR8Vav99W9CXic+t/GOzoA4Ijoz+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=mbBfBJN8pCgxDC7PFoC7ApfvOkHntX88bGnYQbhUUGU=; b=ctIH5ElRawsRVuDrGKCr3og3iNWrf2sQPDXs4CMCGuhLFY0UZYKnCRbdHP5e75gdW0A69j6dX13sb+1Lg+KuYFtRWoXOBjvO1/mYo/820F2HNfiWdRNgZD+bRhwewueh17tDRff86SVXZFHm1+ihpdEsvMAftBb+n2dDCD/Hg1V11HtVoCMTyuRl5dzf/ncu6k0PQ+E39HksB+upTqAR+yL0XwqZuKAlDnM8wixucCkixxsxPfc27Mp7fM1Y8qXjF6/rWThyWjATclczabeOqB02XTJMcPVMMJoaQoeyFEy3VBNrRVcyArZGCuIHDuulvsXV/+k0n4GZtwaqEcFrjQ== 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:25 +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:25 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 7 Oct 2023 02:40:27 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [ZfT5oP1Lf6f7RpBtlNm03DmyhMBSEWzi] 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-2-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: 35b67bd0-e060-484e-e3c9-08dbc6cddb52 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S6KqWUkgrUCP3g8bmDAjyzqs+D+mkxWS2jV38XXo2Wz8kVXaKb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aZCJ2ZN1n+0D3Qc9U5n/0msIb4EyqeigLAFt7h6p3asNqML595WQ5E5BPUjs6NKtcgzIqp7rdEiqNSq43Ubhet6Ixtzmg01n7CqICxCkGwZEavNitPf1ggO2oyGjolwAmDB0FZCaRrYTkzBFod108sT/AHf3gIV0QxWtc8LEJTeGdvvAumE/6H768gT3ni0Pmbp2OA01y6NCLRp3yBGjjAI6rCI8qZq9/AdX8E4rXp6iOscaOttC9pTzn35P/P7GoFs+DSACAQi8oXJSbL9u00bCm12yXFHvbbZJhYSWDQJe24GtEqIX/xnyw2yoTgX//035HyLnBQlx+aLaLvhL1GwlC54feTD3dPlnOo13imM37sVslPkUC2dWdD5ge4BUUVSDuZDOzIgIZ5ibMbaDXX8ri6PY2P8gm8+RED6q1G4hf/Gc6DxOO4ZbwVeCiyT7IJsp3dVvFEsek9S9pMDupJk2FjCE3BG69lJCq3MEu6dX8BT/KOjtLHp5t5E2iA7nkiVVl2ztKVDjRuBGE1tDiHIblh6kAdwSZPlwUXzB8HkmUIwjOP9jLdUmYKZa+1dIw+yfg7MSmrgUfr9AuZLA8cDy8W2XvRMwArvz4F8eQVwFO0euad1/Gbno4K1FnBToIjYfQL7rJiGxjHzc3YpZzxuHwu7TP1ZOIHlBiN0GRQOg/El+/n57NICyZpWc60WbXczRJO/kt39gES/V4nqR5oadSDyGWdOosuZsWG170wEVxupQ7nfEW06u/4lwS2HSuApYPH85Q8BT4nzoasJgsjY/B7FIXQYgmxHEjkmPaZOBpVPPMymVcPsWFomKRVvOuuzEmJZXkRCay3PIa X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35b67bd0-e060-484e-e3c9-08dbc6cddb52 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:25.6275 (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 3/7] avcodec/h261dec: Don't set write-only picture_number 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: mJaf2JrUa0VN Signed-off-by: Andreas Rheinhardt --- libavcodec/h261dec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index a4e0bf9cf2..91d555a70e 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -512,10 +512,7 @@ static int h261_decode_picture_header(H261DecContext *h) } /* temporal reference */ - i = get_bits(&s->gb, 5); /* picture timestamp */ - if (i < (s->picture_number & 31)) - i += 32; - s->picture_number = (s->picture_number & ~31) + i; + skip_bits(&s->gb, 5); /* picture timestamp */ s->avctx->framerate = (AVRational) { 30000, 1001 }; From patchwork Sat Oct 7 00:40:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44192 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp161188pzb; Fri, 6 Oct 2023 17:39:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5U8+7edOZ1tfoyjcdXvcYzqxGOLkyNrWpzLhf5/W6hLlgBad5rCN0ZO9q6Kd47L6xvuvS X-Received: by 2002:adf:dd83:0:b0:314:15b7:20a5 with SMTP id x3-20020adfdd83000000b0031415b720a5mr8729557wrl.54.1696639191725; Fri, 06 Oct 2023 17:39:51 -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 a16-20020aa7cf10000000b00530b4d36674si2011389edy.68.2023.10.06.17.39.51; Fri, 06 Oct 2023 17:39:51 -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=KvOHcSum; 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 07C6768CAA7; Sat, 7 Oct 2023 03:39: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-db8eur05olkn2106.outbound.protection.outlook.com [40.92.89.106]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8263D68CBA2 for ; Sat, 7 Oct 2023 03:39:35 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OUh4hSRAeLtEr7Ac60OJ9pbHjcCLGZ30bpnuDaMTFVvteIzMKnscuvWzs+mbGDGlUIORmYH1nNePG6m3xgbOoeIOiVRj/pAqbfPt82ye3ANdnfJJk1ltTdAzXa1uhZHkbYdHvoF1GTzi6+HwK+fteVdT1qiRDcmXBD4tmha9ciJ8MdLwrVUpdLGEXuT3EEiZstr7Wc7xjtP3hSHEC6i8nxEQgolj0vNPmtG8mq1vW4FM1LLDIkOmCN0arp1FLZQgsNlII91Lx+7q8zzCXJXiMuE4nlSv0DSqMS1CSxpdXOemaQ5L/+0C64rLtq3IcIKW02KgKjd651ova4nnv0928Q== 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=wbWw9d7iR+ftwbOCMRuLFJkZK0tYoUd16eGpowT2kEU=; b=L/Wo74ZBhNN6jX1fy8E7iQm6+VgrV8r7uI5rjObNM8MSkVIN5AjnyU/NgyCE5rYTUDGpo1cicjajQi7DnzZ2E8oeKgMdRXUm2gCGC0yNnmKRJdbVrdB/o4ff+I6zujH6iDyHvJCGQTBIB89Id1QlPKSCMEkxilYCKbEU/biU1zCDAxLr4K9GtjqRFafK9y+SQXNKl66dZZvdkZU03hRlWVM8i81KSdZ8OAFhYw2yhfK1Rk82zAfqgI5bizEeMu4kgLXcjPZG1gta5HtDS1EPSLPV9RyCqeHr+SoFyYXtcP8ZZkyAYbKF19wRuXCPTCstDrw197k3svLBislsEfUTvA== 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=wbWw9d7iR+ftwbOCMRuLFJkZK0tYoUd16eGpowT2kEU=; b=KvOHcSumx1MENiiyk3Qu4zULjtY1H7wtapYrEhLkYPGuJHQ+TFpGePHA574Fxgwd0VsMFCbJTr4SaNMx5cpybI0bmgY1y27kMwT8f9ez6HIbe2crKEnVctxGI+v25ro95CaqB0JZgMWd/58yc5jx34azj8rioHsJ8kwNy7rei1L9oYP01FBkOvPTcv1GdhWFqRpvAiHHI9I7zKY9NoPIfkpMVzs6rvLLE4/rmHpCZ0T7pOVuRnLE3dXeKzLJmIXfek4JH9NjGgB5x/sMixzVpDk7bxk6NKTUWKdnLuXIFSMnHWRyGJ0FBGkpU40rewVxUSXVMgV/w0edb9y3LJXPTQ== 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:27 +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:27 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 7 Oct 2023 02:40:28 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [gwwkODZm9Q42zrgGtb460BLOWdcKaDXU] 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-3-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: 50026545-adf1-49de-c217-08dbc6cddca7 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4fcjnxa0hU/tjV8AK7DshYrTSZYLZkk8X+/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k0juEKE4ZRHZuebXdPFbuET3VGK42gRiEtCqAveYboP+age7+7KEMrGdG5UBYlWBxAZoDMnA/Hc9FZIFRnNcRy0DTcg0kH9c1sIs5uPqxxM8lUrFTxnKVSElXqyeXaDWvkPRIOIvhFhjaOfU4ONQU5HNrIRdvwh5gWoNgPPXDMoizu6Zy5lgjhtBuxfmbo53TFB44oEKdO36zYtHr9AxLzP05ihM3HAjdzbATnzpX5zXTn6Kx7HXGivwq9X7ZusC5+8al6wxnq0ry6teDP085d2UVVTZh6JA0v2oIaVxh5rlhm+PsyfSTFUDEsSvOrhbMfExHwmVRY3kO4KhuEkKdGHZYH36pXdItxC4decOH1Yb8XlzdkuO1nUrdRi5nGMg0g/DPTFWPhu+Cfq+vMLIXOW9A9KRyMnGI0Yv2OC9UJLRrBdMnuNqOU17Mevsk8RS7jAOUesOR86XdArLQYCeAnKhJ+XODYDchKzFTSKTPFFfLMBNShQXxgy3FLmKPHkkcZwSOaselTJtP0K+gRrQ14tUiNn4ef8axojeYfqW5EAcX8XHDcZ533wolq0ydrvKzI9peZxFw5UvLgE3McjcLz0Dk8+zJHJ/WyRqXLuI1aYHm+Kh8767Lu1YTeHovwjsCBftXJXOkQjjB3AKkPj/f6lzZkQ35F+I1sR4833+tmoALll8cx6/eH63NwpIjPJZWkoXQuqoPcdqfEPlgHh5Y/SiIhTR0M6N8KZpoOcUpOWIeTgqnswe1gMgRg+DudB5N9ukTK8F4c6iuX33Dp7vHOKr4QJG0BIDQWu8EuAETmyD0e85PafnnnAcRLuw4IMl4rsd1DeUqSf/sZEPOHxXJeB X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50026545-adf1-49de-c217-08dbc6cddca7 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:27.8249 (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 4/7] avcodec/h261dec: Remove pointless goto 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: 3ELIJWbYd4ZI There is no need to parse the header twice; doing so does nothing. Signed-off-by: Andreas Rheinhardt --- libavcodec/h261dec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 91d555a70e..272bbbea34 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -605,7 +605,6 @@ static int h261_decode_frame(AVCodecContext *avctx, AVFrame *pict, h->gob_start_code_skipped = 0; -retry: init_get_bits(&s->gb, buf, buf_size * 8); ret = h261_decode_picture_header(h); @@ -627,8 +626,6 @@ retry: ret = ff_set_dimensions(avctx, s->width, s->height); if (ret < 0) return ret; - - goto retry; } if ((avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type == AV_PICTURE_TYPE_B) || From patchwork Sat Oct 7 00:40:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44193 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp161231pzb; Fri, 6 Oct 2023 17:40:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHbPodmtkTlijT+JEyIHG8+oGvv8frbLxUg7WK66bMmY24fcBvtYMHSu0eDzAe+U9rqHYKx X-Received: by 2002:a17:907:868f:b0:9ad:e62c:4517 with SMTP id qa15-20020a170907868f00b009ade62c4517mr5619850ejc.34.1696639200022; Fri, 06 Oct 2023 17:40:00 -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 e10-20020a170906248a00b00991f1e4b044si2075445ejb.336.2023.10.06.17.39.59; Fri, 06 Oct 2023 17:40:00 -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=KFJi4oMF; 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 0F44B68CBD9; Sat, 7 Oct 2023 03:39:47 +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 A66A768CBC0 for ; Sat, 7 Oct 2023 03:39:40 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aLzHFEuFA/LxkHppsEMm5UJ4b1k3sknz/etsIOgMk/mN3pCEQIGb1cUh2H5imphEM9Ir/IG76mZqy588La1L23YT3pCDzqQWxITEZ8xEiKDbR1bKnGrgh+zkp28080icWqiYrKthoLBb5Yd7IqrftoJtDmwKfpFyaHd6c8Rak6FRO4x0VjwDn2Oc2ZxnuNJvWbY2vzrlcKz1uFDwIy47SOUOOtiElsQiBsPOaiDxUaijSung4jnNbMy+/AxBOSFZ20dbtbn1isXBdiWq/cVALQzElhqyzlEhuW6dYU07Jyjl+Hwg4VT2jLh9J6JIaHRpkE4/SuWs9EY14UxvjBJJrw== 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=QH6YRw9MfsETYbO/icpEvtcAQYuwxmO0LteqPM3/9KI=; b=bdudSJQPkGDHvyjwOb1rs6ztYCwf42OcwkuMM2bt5UM+1itGaXpRMbLUgQihUSxjBqJNvDhMtadtd9RfBYTLVGcyjomT9l+8mbMXBOnUu2FCt3U0SJaJqCdSQ6joxSet6IDrueXDLagGXbCCu9fXyarRzcC9Ve1hQawByL3zqF/oWy8wm+jTs4ADWUShhVu00sQUQUm7eWvpDuOlYkWCJW131bQF88AmdFjMTr7NtiyzBGBiO2/tZ8UcHWjSxw4IaCqWPkIEBM+d59k1SYREkepLj/Pnud3SSoc0MqCI2ouYZb0XKRFmCnC+qUaOW3dFB/D339ZoOepJDIUVBDJhxQ== 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=QH6YRw9MfsETYbO/icpEvtcAQYuwxmO0LteqPM3/9KI=; b=KFJi4oMFl9uMevk7QSJgMaQEWYlZu9qPN02UHRyHVk+LRN0G1tStkYSfSKrFR6vPlJtTuf/2dE20bbj6TdkYkuzWt14eAGqMH+nQWicAe1cuhvoyy2xAoZDsyy963/9JNDMQmICPsx/OB/TeYorWbmABi/x4X+ogXPQywSiCZ281+QrJ079NxpSEj7r0NRxsmb3iz5MPBCCqYEMQBlrGrdW/tx7ojs5FvXasCJQQlphplwtPEejrcZn9nUUKOEPwbKUWapfoQMPTjHiRDAQf5lOuAdoKnFXwugUGmGuYJp7BcW0CHqE+rV3S349S3icPgMgfRYogCyt4309FUi2PtA== 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:30 +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:30 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 7 Oct 2023 02:40:29 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [WpMG1ic+VbmXDyW18nDADx3P55vlRU6d] 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-4-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: 74091c88-31b2-48aa-3cec-08dbc6cdde19 X-Microsoft-Antispam: BCL:0; X-Microsoft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kkTbJJ4i+CF0dzXhyumXy0eQ5eRExjdO5be0TiR4XtSTLpKJ22xZIg8+0/iDFM1YNIwwtmG53MxydWkVP2525hPvJcF7bcI3h2JS2TbBALrQI0BGkhScu06SYCzqKLr4S5hwWV4HHt7IlNA6303eASLffqe1bAR6QUQBRLuowu3BfH66A9LYEPA/mhPD0WqzPfai7dLgaFwWdytarOrAcb/X//5FcHnBXrAJKqhoAJW38JRXsV+mFez6CDi2yMjrwXO22bXJE9/4v2c5VUH1rqXqj3QxxQpv+l5NMim0EEVZVVnm5yxkj66AGrnQOpyVT/oJRJbvi3aQmenUhY/y5LjF3+nVdvDooosKMtjcPgiUd3fMqACXslFwv4+B3MZ0/m/K+9pCCMF139HOrzzbm5piUip7nzEoMhcc9k16HyOL1AQNHVmj0qm2JIUsEJpmvu0OnggE4+1CZeYTq8jKpUJRVuCmfQNXjL0IWLAnVkcdqaOOyJ7Jpf2w6HE2CLiK8tRQhhfmJIh1oIBuplxbeElRxSA2kA9UGbuKQQXDay7fXbv6nCMIhy1/S0uCFbfP7xnV8+4XUzrYh4lwGOXlUHhSm7VNK7ykBDKJ/LKd/4tlO0hY6f940hPK1zi14DQgl2p+TD6sEhm5zl6Bgo9hOeEMcH7w7q60Q8Ml9sgUIGO5Upm42kNI1jS7BV+Gueb6WiH4rJt2lxIdbyKTBn1DG9xdhDXKncZu3nnouk+CiZo5zrSlo0yRv6234qw8mm91gAXxyRplC6RsB8g48KTaMbYyj6I269H0H6CQ7GWH+SmSRqkb16O0AVW3EerYd9BPdV2VJH1QxErw7JsSVPA1X89SCt05Q0a0kRlHAZiBnH3mEy8V2JizQqQWKBrCzJlKx3HoHMX0VheY5IwDz6w6w46WtA X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74091c88-31b2-48aa-3cec-08dbc6cdde19 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:30.2502 (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 5/7] fftools/ffmpeg_demux: Don't use fake object with av_opt_eval 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: kb0hkOARmJ32 The av_opt_eval family of functions emits errors messages on error and can therefore not be used with fake objects when the AVClass has a custom item_name callback. The AVClass for AVCodecContext has such a custom callback (it searches whether an AVCodec is set to use its name). In practice it means that whatever is directly after the "cc" pointer to the AVClass for AVCodec in the stack frame of ist_add() will be treated as a pointer to an AVCodec with unpredictable consequences. Fix this by using an actual AVCodecContext instead of a fake object. Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_demux.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index c71edf01a5..41fcb678c6 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -1042,9 +1042,6 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st) char *codec_tag = NULL; char *next; char *discard_str = NULL; - const AVClass *cc = avcodec_get_class(); - const AVOption *discard_opt = av_opt_find(&cc, "skip_frame", NULL, - 0, AV_OPT_SEARCH_FAKE_OBJ); int ret; ds = demux_stream_alloc(d, st); @@ -1176,18 +1173,20 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st) (o->data_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_DATA)) ist->user_set_discard = AVDISCARD_ALL; + ist->dec_ctx = avcodec_alloc_context3(ist->dec); + if (!ist->dec_ctx) + return AVERROR(ENOMEM); + if (discard_str) { - ret = av_opt_eval_int(&cc, discard_opt, discard_str, &ist->user_set_discard); + const AVOption *discard_opt = av_opt_find(ist->dec_ctx, "skip_frame", + NULL, 0, 0); + ret = av_opt_eval_int(ist->dec_ctx, discard_opt, discard_str, &ist->user_set_discard); if (ret < 0) { av_log(ist, AV_LOG_ERROR, "Error parsing discard %s.\n", discard_str); return ret; } } - ist->dec_ctx = avcodec_alloc_context3(ist->dec); - if (!ist->dec_ctx) - return AVERROR(ENOMEM); - ret = avcodec_parameters_to_context(ist->dec_ctx, par); if (ret < 0) { av_log(ist, AV_LOG_ERROR, "Error initializing the decoder context.\n"); From patchwork Sat Oct 7 00:40:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44194 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp161290pzb; Fri, 6 Oct 2023 17:40:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnjgBhlGk4At0w0sRzGZ7WkmPxeOw51AaoxJvRnJC0XDk/da4LsDSlnJb1Vf86n7fJg8gu X-Received: by 2002:a17:906:74c3:b0:9b7:292:85f6 with SMTP id z3-20020a17090674c300b009b7029285f6mr7599706ejl.12.1696639208213; Fri, 06 Oct 2023 17:40:08 -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 b13-20020a170906d10d00b0099ce780a194si1966748ejz.667.2023.10.06.17.40.07; Fri, 06 Oct 2023 17:40:08 -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=aeIfvMnp; 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 1C78768CB9E; Sat, 7 Oct 2023 03:39:48 +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 DC03E68CBC0 for ; Sat, 7 Oct 2023 03:39:45 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VlGSm10wdQFjB8ufKS3dYdEx1IUrDhZfnO6rgr0p6FSuvS7B7b5LrlDVjo8jPohsdhw9r1ZEltdrLOd8/UpkFfFmb7EZsedwm324gl5lgBFOOuCFQPwd4Mr2fiD0BCXhqCv2+c7t+8ErTrK9+N7q1bBidxs7v12qDLIwajfHm1f0h4uVy5RQbTujLqlcEozDy35AWG0Y9L2hSkhZG02ni6ZlLgi10ZTA39jUAmK+q6Srrl5rC4XbwzqPsFdH1v5W3j+0mtZ64NzrMXxRNfnY9At6vTZMnM7P97VMlT+uW1IS97VgLO9BqtpBcrQfWia+Q9Cx17uDw+lVLXO1f+sOiA== 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=jU0QT1V24M6CoCrObZZ/xc72FkuE2ethMWbei/p1HFo=; b=IdlAeWQXdo+GmYhBVcu1OuTAlVQzk5HUX9pDfMPGU+oImLr8JDXlw7RxxKsJVRQ+nlWUuYmNUS6+rKuVn40Na1RcD7tJ/zygSTxo6iQNdbZ0UXD8NUi+xUNmc8ecspnD+xgfrIJQdx0lOU5x7x0JbztHFYt90qkTOX7tHuTjiY9qUiXUM+EXgmD+rtlXcqCSjBDHCiCL0oA1hHUsXJLz8mQufckY3rxvh4etAY4Yu3n0fN7H0tSKBX58pV4OYZ8/VCmLlI2dkvCnXeZcTyq1WNCPouXpG73ePpq1rcSOPtM2n15An/u4mH9CBwqL3rHN5Kd9ahF6GMqlZWjKUOlOYQ== 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=jU0QT1V24M6CoCrObZZ/xc72FkuE2ethMWbei/p1HFo=; b=aeIfvMnp0j1obbWCoB/j0bSayYTB6KgMVcmFLV9BhK2tAU2CSr7ehK4fUgLkbWpcC6GlT2lk78xQn2PNKmd/QPCRGBofIsw8lyTTD2ZXcXzroSZPk5FZR5GrJA+HyQPSsaanjvOQgdmhkORXQ3y5Hzsqmr4m5n/f1pDYWqcNxL/rmqR2KHCdEJiUPRWdWVeaLg5oZiqdkV0jr4VVyhEuHkx3nFsRwJEp92VNvVzGrtteD3LaRewyVLfRHgR/N59g014Bgx4OMbLByeXYLIxzzrHV3M3t9dAgMHc2KRIBmOhrdkR0/VcYnFSE/aZu/m+UW4YdSDlx0/rFHBlYyaBTTw== 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:34 +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:33 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 7 Oct 2023 02:40:30 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [hKbjiH9XZBebhrE2AZIcck/ifoTm5/QR] 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-5-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: 6cc0f310-e360-40e6-8866-08dbc6cddfe0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DLWUAw5mWBlmwOIaPUw4uC38uw8+OHSEW8Ua9y28A0fC/iL7nJEdnqs7cTfxac7+ee7s54U2K9tq+Gv0iOoaUelRxKOmwTjlAunofp/eIBuZmEzM8V73gEjMf+mmAMJxIcvYOjeTwCb/5EOHogFW27IQ1bdlxoUXqpHTz6IsKyMnNOdPwHs5V2+ma/usrZ1+IThlRyg+Cffan71ErtqlDLklRGrJl9SMG75A9mFCb3bplbIaoL4MsgrIplNBKqCvxV13gduYTOYlDTAtMW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VISNJkbKdiUxXH1+rGpSHcUZhpFEPk3XwDgTB51YziZCx++2HoLt99cv2y3p6aNVdZiorhK+M68gcN7g+wHGEmonRnrJesLYMs5+Zdn71jU/r3JRPuMBqvczCstdBFc6dYQRO3tgMwQBi+MdNM7LM2ZY4fe7qFMIi9c/361o4nCPxQa0wJeaAvuKxgGamieu+QKb+wGX10Vod9o+RBME2oMtGhU4jKY3kFN5Giz7SYfcY/MZLEtTo00kpGG7wJAKU9OjoRS1RLvwbcIZe/CNPDUBtBjqTVF5klLWljP9c3WLhEIHllz65Z7QZGbIcJp472B0iYU6GyoqhV2AHAEL0dcEuzyf0ZYQxaP3m0LLoGITYskOe3y91KHmRWx1Ys2MxXf8VB/LGiBOrYA2U/A9CpLptCsE5Cf+PNE7VMuqWO6H/qLfeGjKHWWu2vIEpcwnQkPg66AQh05p8eLLwNNbY2UYG7F8ayEH42M+ppz9uBDi2kyuzLsfQdcrKnOdZSoOt7aiA58YGr8nJcRaxi2B7FdjzOAEQPQ6VxH11Qq31ohcG9U1wWyGkLRzMxKWiu/DLT4roAoFSuG8QOexAmhY7yBgbg0ZAT92h8AUPsu9uC4tNHq2bpa+dbr2L4mzYO6S X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6cc0f310-e360-40e6-8866-08dbc6cddfe0 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:33.2153 (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 6/7] fftools/ffmpeg_demux: Fix leak on error 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: 0bnhxUFGiwrv An AVFormatContext leaks on errors that happen before it is attached to its permanent place (an InputFile). Fix this by attaching it earlier. Given that it is not documented that avformat_close_input() is usable with an AVFormatContext that has only been allocated with avformat_alloc_context() and not opened with avformat_open_input(), one error path before avformat_open_input() had to be treated specially: It uses avformat_free_context(). Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_demux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 41fcb678c6..350f233ab7 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -1462,8 +1462,10 @@ int ifile_open(const OptionsContext *o, const char *filename) if (data_codec_name) ret = err_merge(ret, find_codec(NULL, data_codec_name , AVMEDIA_TYPE_DATA, 0, &ic->data_codec)); - if (ret < 0) + if (ret < 0) { + avformat_free_context(ic); return ret; + } ic->video_codec_id = video_codec_name ? ic->video_codec->id : AV_CODEC_ID_NONE; ic->audio_codec_id = audio_codec_name ? ic->audio_codec->id : AV_CODEC_ID_NONE; @@ -1488,6 +1490,7 @@ int ifile_open(const OptionsContext *o, const char *filename) av_log(d, AV_LOG_ERROR, "Did you mean file:%s?\n", filename); return err; } + f->ctx = ic; av_strlcat(d->log_name, "/", sizeof(d->log_name)); av_strlcat(d->log_name, ic->iformat->name, sizeof(d->log_name)); @@ -1527,10 +1530,8 @@ int ifile_open(const OptionsContext *o, const char *filename) if (ret < 0) { av_log(d, AV_LOG_FATAL, "could not find codec parameters\n"); - if (ic->nb_streams == 0) { - avformat_close_input(&ic); + if (ic->nb_streams == 0) return ret; - } } } @@ -1582,7 +1583,6 @@ int ifile_open(const OptionsContext *o, const char *filename) } } - f->ctx = ic; f->start_time = start_time; f->recording_time = recording_time; f->input_sync_ref = o->input_sync_ref; 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-Message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OWEm/3Cay1GByGhoQKtOlV2hELJZ1WwTHHLZ4oysQCiCzQx/bFUJoihoNFNIs4NB4fSWpQtxPM8tpjlIsqVmR/dOcnxgcYxatK1ZqEo8InygYyf5zv+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; From patchwork Sat Oct 7 10:16:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44196 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp343153pzb; Sat, 7 Oct 2023 03:15:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFg//LDzSc6kjXuFjFdm1LhSH4cKz8u9MTbLiWohrY9RKqqN3xd9Lr4FIODY0dnekEN55Dn X-Received: by 2002:a17:906:2dd:b0:9b2:babb:5fe9 with SMTP id 29-20020a17090602dd00b009b2babb5fe9mr8944006ejk.23.1696673721853; Sat, 07 Oct 2023 03:15:21 -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 s25-20020a170906bc5900b009b27445e000si2438464ejv.287.2023.10.07.03.15.20; Sat, 07 Oct 2023 03:15:21 -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=ILdaNhK6; 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 7B3C668C963; Sat, 7 Oct 2023 13:15:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02olkn2025.outbound.protection.outlook.com [40.92.49.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 351FB68C9AA for ; Sat, 7 Oct 2023 13:15:10 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hp5BTAebUWmEM2eqbMI9Vh2pd9/NnzqmWxZlBr8bFf2jb6F7WPuK3GJmLFiG2fjAiko/Qzxp20OL8Yv66YppwJAeOu1QhEgnNn+c8DjB6wv8Xgj11sTKCbJpFAFyPqv2omqPfazUdnOXFGj9EV4w1QzQ3TmTt0s4NzpAmGFJsiJU2njC+aDGAaA5atvhidZV5mAbPetCM3Kx1YOOFSSA5Hf0KjmdbqSsnP1+rL0r//gn2dxBgcRHUQSqqxdhCwn0G5RZ4kdE67P8iAnJshOaBIOWbE/6utpY4ok6Q9uZCGNROWmB2cQUhpSAoDB7seEQnPeTSmbDwopAvaQnHJFlOg== 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=6nTxagLUES5OkUsniNMc3bvDzhdoejDZow8zwteIW4E=; b=c8VrIUpj2zWjD/pKZkGDD5jzbW70kDD4A/88z2slXQ12ppkY+bxX0MT2MHg2wwX8OP90MwHYrP/CsklKHIvuptOvJ4wXYezAuuEfk7q0u++ED2MiSl02q3Wznmuoqu4SLziFB9QyHneBX9imQX3n/BLUHOCIXvKy0g/b5QygB/NMlJNlO01Bp1oJmYC6y3RhVxr/DNno641LCtcuFphxwFwFCJymLZvxdiq4OTRcAoZIxwflqIhiscC6lKgawjI9bauiEML4OE1czfb5Sls2MpVRvl4lwNWUDxVAzUx38Db7ypknO/r8qcTCeNwHYdHcFFYsk9N6usAGZk8eyRSt+Q== 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=6nTxagLUES5OkUsniNMc3bvDzhdoejDZow8zwteIW4E=; b=ILdaNhK6NsEn5ervjdB+Yh8jQVXmVARsTf5K8gJEvekqnTa4SRwaCsDGWf0aatFuvMaQdMBD77KsX5vHo/iBYKhm/erPJiwiz+srW+2CCk6awU8vQYSw0KTB5WYB2nouyCy/C3blMQdxfTYcBGUv5wbp2jFpgd2IY+O2p0P6N8J5bNY60VKLS0U5RxFxO3101M8PREjm0AQ2iI2l4rkGnE8sDjEfHU701VIkJtorkfhqwM4Q92aWdUAKZPpXHR5kJbbmAEzURwEKA7qHdSGQ3HB4rn9gxvcf/oeArX/sF7IBvaxqKQZpej8jHNRoVHrcdtx4ea3nPhHzuv98A5SqYQ== Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) by AS8P250MB0217.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:378::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.41; Sat, 7 Oct 2023 10:15:08 +0000 Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::ec5a:5f06:b873:e81b]) by DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::ec5a:5f06:b873:e81b%4]) with mapi id 15.20.6838.033; Sat, 7 Oct 2023 10:15:08 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 7 Oct 2023 12:16:15 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [mDjLe1at9b7jBoSMIdTbCPeE+ad1bIcy] X-ClientProxiedBy: ZR0P278CA0069.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::20) To DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) X-Microsoft-Original-Message-ID: <20231007101615.2203587-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0P250MB0747:EE_|AS8P250MB0217:EE_ X-MS-Office365-Filtering-Correlation-Id: a2fad1ab-f09d-404b-0835-08dbc71e482b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EvHLf4OZ9F0kwmUeI6jPOXS1eibxUSdXLuksWF1D6z8iDU7ERl2psh/G13Xf1++xdIat6ik7so1qF6o/AhbLgo6DIFGLpu4LTlaG7D2eofcA8CIn8NYoRfk2b9BPCsk0+gnS5Md5Kez3t8BsZVjpmvF8AeeB5qQd+TzvXQsqFkq3Bg3fs9CIItYT3xXakubQyqE9tXWr66X92lYEiVfMYL488I4R+MQkLWv3VzRlw5Atxdo6khISBFI15uNZa++N8pKsyW/Kjeuy7ZIdP+BLmfrXimea/Hm0Sv32sWePZh9hPCW1Ui9gXAd3JkWC8Ez4RFFytPjZAC6nYCPWqdS2/8VyXvDpn5k0HFaeYgY0kRRM2mascS4KQq4xFdpATz7aBGMlYVGiMQJcriPvOPoFA/WxWTogQ+C4AxjU5/gUc5peGXBRpwXqv7emDSCacyrHMLsecfOf4aZh05jR5ANPtZumxITx8s78PxKjnLKGhQwndFcHnjtWcAL0SxYyj7ciEOzacBeCsCYUvUZ4pBNIt3aBF3S31DCsLDoiG/kqmINdKx+MPG4TLBvG2z5B1qhMnRz4Pr6HgiP/MdeIZ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bLLq3F+9dYddI67frK23VCZgJFQslJkmVDJd83p5VT89TxQe1CZvtvWWun0ID4urVJGysp9TwqTTvgZ5miLdPAA9S3J3GtISXRS/nv8Va8GJWuPUBYCWqtJEeTJoo/jHRL9l/qshgUWWafLC9bNu4kfXQ25hwG6+Vv9SSsKyJHvIhA/oAJE35fOaCQj4qzd9z9uftOxzi+oFhegCjVxaTbZydsAiqu/eOtdbbReb75k+Vf0ri8RnYqctOfni3VnqDKkRQkqNgWFpYDUX79TejqY/RHG454hs0VoBDpDGeDiN70+Big0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2fad1ab-f09d-404b-0835-08dbc71e482b X-MS-Exchange-CrossTenant-AuthSource: DU0P250MB0747.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2023 10:15:08.8225 (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: AS8P250MB0217 Subject: [FFmpeg-devel] [PATCH 8/8] avcodec/mpeg4video_parser: Don't set write-only current_picture_ptr 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: FjIWfoG2rUr/ It is unused by ff_mpeg4_decode_picture_header() (unsurprisingly given that when decoding this function is called before the context has been initialized). Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4video_parser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/mpeg4video_parser.c b/libavcodec/mpeg4video_parser.c index 28353aa146..402594e01d 100644 --- a/libavcodec/mpeg4video_parser.c +++ b/libavcodec/mpeg4video_parser.c @@ -89,7 +89,6 @@ static int mpeg4_decode_header(AVCodecParserContext *s1, AVCodecContext *avctx, int ret; s->avctx = avctx; - s->current_picture_ptr = &s->current_picture; if (avctx->extradata_size && pc->first_picture) { init_get_bits(gb, avctx->extradata, avctx->extradata_size * 8);