From patchwork Fri May 21 09:17:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 27863 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp342520iof; Fri, 21 May 2021 02:22:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzd41ShKqNLtR9gv0+087y5f3tebDLkJoaUXsm9voOPcE0Lt5i0qIXJE9oL5F0IW3BQsTOA X-Received: by 2002:a50:fd11:: with SMTP id i17mr10045465eds.23.1621588973817; Fri, 21 May 2021 02:22:53 -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 r17si4854534edd.427.2021.05.21.02.22.53; Fri, 21 May 2021 02:22:53 -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=iP8G1qtR; 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 1C36D68A03A; Fri, 21 May 2021 12:18:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074039.outbound.protection.outlook.com [40.92.74.39]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1CFF9689FE7 for ; Fri, 21 May 2021 12:18:36 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D1ts7gjfxCt7f7UPlw/QsmL/a06kkHBKViQpW3xWWSSwUMaZ0PiUaL8RwN0D4O7ChXHIeEq0G5g8K7ymSbJXHB3NLa6CN9K0ijTHBG699hHZo373lFyx8lDTECcbrKxICNHWRbd1jtY8WO/C0DbhR8W2GBRU+8i5OC+a3tZIIni+hP9Ob1ZBj27TsppoT91earCNaZoTmchNkQzGhzeVRpJHzvRU0+2hFuAUjwwnA9FD4Ko+d3wU9Q6AYsvCy07HXlBZbnvx1vdV0nOKupEe54HBPV54+8iSHO9UxKD1z+LMJQRCB1CRUq8Byh6NYyh49FsxlQDmuIgNh9nxitr5tw== 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=mXwjHvXxdd9o4jXL3/16pvIyCaYSRFZpv/SjhUbI8PY=; b=IuOuslRoeqR2QDXKezA9cidD7np0eXBCaZGnJZQhukN9nWgyz596yUotKflq+VtukTSUJdcpQAu1WS/egWVFRQSbHPhYGZgM34J0gI0Iaw2o81Jul7NyBQ2ubPzxn7YVOnh1gXXYyfiCwgTfkz0BJ2htB5KzJHx/BtCwnyjpexACw/A1JtVkU5V+VSryWJWlBgI8C5D4ihf7EjwPdlqemr3ujQJJjN3G5aNVBQbIgjts2PWA/KyP547K4ErSkEQ6vpMUhkPHzkRr28cvhD4uP5Z0DYL2nb5E3QrYWvFJNLqwWBIDzFox8xZNd1VEV4QrAsdMTXhW7DMD5Xx1xAo+Dg== 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=mXwjHvXxdd9o4jXL3/16pvIyCaYSRFZpv/SjhUbI8PY=; b=iP8G1qtR82ZZE1fkYs2+GNljprG46VwxBnkd1Gy0roxny6ecIgzi9o2XI2hFy0O4yS3LMIVDT6K+xxjT7NDPxuEfIIYloFLIM4+WuQYBQV0aX4uipyHm5jxhrdQ/FbNFyQQxpXzLWA9Qh2cjPmmopq12JUDzW/wRU/UMTOh8/xjP18VmKtYJUQ77bsnzyIIJm8mOEPrq+S8mbdy0f/LLYeDK0ZAPMWudYMrXCTazlsyCV1DKcs1tXjKrepywwfpyIBtu8beXo5BgmE+hqEeQptEV7v/BmSvI26SaQck0HX9U70Bzn3CIHxHbEYfYCAPq4XSToU/Ke45sOg2Vxzkgqw== Received: from DB3EUR04FT030.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::53) by DB3EUR04HT144.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::228) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Fri, 21 May 2021 09:18:35 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:7e0c::41) by DB3EUR04FT030.mail.protection.outlook.com (2a01:111:e400:7e0c::99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Fri, 21 May 2021 09:18:35 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:051AACCFB6893DE1235CAC92694B46848D128B002983EC0CFF7CEA7D2121CE1E; UpperCasedChecksum:11013A5B52AB4D85A8D966C4DAD22DB6F3B3773766E079EBAB2903DD44CB6D37; SizeAsReceived:7606; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::f4cc:63fc:9cef:37fb]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::f4cc:63fc:9cef:37fb%6]) with mapi id 15.20.4150.025; Fri, 21 May 2021 09:18:35 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 May 2021 11:17:33 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [glMi2q+NTRfa+IZ5xPRsE8Z+fnrbIvy3] X-ClientProxiedBy: PR0P264CA0070.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1d::34) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210521091742.184902-29-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.95.27) by PR0P264CA0070.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1d::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Fri, 21 May 2021 09:18:34 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 80d3afd0-23f8-4085-d2c6-08d91c396923 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UIohmq9k/yScywu9xPSfiUSg5eMVceR/q6wPVUTZ9GT8Efr/shTyvvoOrTcry39VyOFlcd4SOw5qZS4NUnd/VbsxooAUxpVEvn75Y7+y1YF9mzomV+Trk008PuxKO+ApXRS4bCBmISMYcNaaWhilWtUcjU7mnKUF4m+F9aW3Yd2mrHh8q7KNyWlMaadJsySXNfh2xwEu1+kLaGCawqrsw+AFtcmHz17RFAm9GMbOGkuSyKXUYFpE5i8+LYeWK3pUATg54GNPfh6ioFncGUmP49HMYRhtP0GxTuutOjVIYoVwOohSlU2BqmxNsfTQSX/GDnudg41TVP7bDElF+7mHp76f0D0qER19xjppNiQ5scv1a2+VWUn158Fay9KRR99dcqZTL2o0QfqcgOXll/kSlsrrez7DzlSuWPWGCfggEHIsM6DENh/Zc8Gv74w1rwqxFLBegoDk4UebY87TcCgQJ1+9EDSa0y18kxXfgc5bmGuyI6aDroYBV8S0Di/VDPQmqrh8ZRfRLXmlzbYNJV1uRKmrd3+j4j/0sQabu3mH7I+vxBrpzk9+SJqEiRFB6SuobKRhT9X2/enElyQQ1KiX5XVHGmpyc2Yi8r3NeZfGPnEuTWlHMaPaE3BwXT42nerWJfVxfff1splUtpIvcaHyQY1bUC1HfNoRJmdHSd89djZ3pJp7yJTxmWpimVR4IAu2tP5fOuVAveWgQ== X-MS-TrafficTypeDiagnostic: DB3EUR04HT144: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gzm+RLVlWWiJPLyOByTO5PEMH+eqF8RVhAk0LIzv9nRS5QN8AcTu10od0DpmZrl//2oZ0nB12vyykEt23evV0eJ3+zHgy50qLjlm2b4f4Iv1cA1rKDMF46Go2NJtnNJRBNrB7pukm1aH8TTrTQzWekjkQvR1rpIRAidaOH7jJTils+wi1R7/FJ53OKV9SNLGSavbTUi0UeyfM0uz9EQ09Elj4hwsUpjSlLXX+hafILT7b072z+0EVdZGz/jasXvGoMXeWFPG6Tp4obT5ofT+c3n2K+6bVO6OiFdb70B0pEuOipElPiyAQpMuzLvgzK5Pr475V7RtcJ1gK2+lYxF1IZaLjy+UHGgCzFZqUUdjvG5XnQerXmqoXsQ8zZV88QrguOuZHMUyBukdDqMYZ+V0Pg== X-MS-Exchange-AntiSpam-MessageData: Fy3tbp+rikDKSs6nJwjm2jhGSpQoUHsZpQg6Si9JfpCG7rqG1uimA1hB5gg0jwmJsONYIiaaR8FilhuwYyiotDv2Su639M3xFzOPDRnilverfaa7JjVo6nPeLuEnT5tgIfIYWg/2AGac9QOdvQnEfw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 80d3afd0-23f8-4085-d2c6-08d91c396923 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2021 09:18:35.4803 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB3EUR04FT030.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3EUR04HT144 Subject: [FFmpeg-devel] [PATCH 30/39] avcodec/internal: Remove outdated documentation of ff_alloc_packet2() 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: XeXS2ds3iYle Its documentation described the way user-supplied buffers worked before 93016f5d1d280f9cb7856883af287fa66affc04c. Signed-off-by: Andreas Rheinhardt --- libavcodec/internal.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 60f65d3f2c..19c4e9e3f4 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -229,20 +229,16 @@ void ff_color_frame(AVFrame *frame, const int color[4]); #define FF_MAX_EXTRADATA_SIZE ((1 << 28) - AV_INPUT_BUFFER_PADDING_SIZE) /** - * Check AVPacket size and/or allocate data. + * Check AVPacket size and allocate data. * * Encoders supporting AVCodec.encode2() can use this as a convenience to - * ensure the output packet data is large enough, whether provided by the user - * or allocated in this function. + * obtain a big enough buffer for the encoded bitstream. * * @param avctx the AVCodecContext of the encoder - * @param avpkt the AVPacket - * If avpkt->data is already set, avpkt->size is checked - * to ensure it is large enough. - * If avpkt->data is NULL, a new buffer is allocated. - * avpkt->size is set to the specified size. - * All other AVPacket fields will be reset with av_init_packet(). - * @param size the minimum required packet size + * @param avpkt The AVPacket: on success, avpkt->data will point to a buffer + * of size at least `size`; avpkt->buf may be `NULL`. + * This packet must be initially blank. + * @param size an upper bound of the size of the packet to encode * @param min_size This is a hint to the allocation algorithm, which indicates * to what minimal size the caller might later shrink the packet * to. Encoders often allocate packets which are larger than the