From patchwork Mon Apr 19 02:06:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26971 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:49c5:0:0:0:0:0 with SMTP id w188csp684536yba; Sun, 18 Apr 2021 19:06:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXTTIq/+Ju+PHCBQGl1Y9i5pMLcqbrHPn7Fpf9lkzFpEE148N2i3L1xU2sdNJkBsOpOfY5 X-Received: by 2002:a17:907:1b20:: with SMTP id mp32mr19780449ejc.495.1618797992089; Sun, 18 Apr 2021 19:06:32 -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 t1si11168755eju.712.2021.04.18.19.06.31; Sun, 18 Apr 2021 19:06:32 -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=u3Ne+0T+; 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 30DAC6809C9; Mon, 19 Apr 2021 05:06:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069011.outbound.protection.outlook.com [40.92.69.11]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 37E58680154 for ; Mon, 19 Apr 2021 05:06:24 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P32jOd3gj1L6/1Cs1m9DWkQFIA9vgJNxQCiCqHEJPTAkya8fYpnxQfCERzz/v/lwAKunJKmlF8vWINM+bHi0KJavpqDsiW1T5E4FX+8k0TXoXFOjHip//TFKIas3RXCY597jzfClOj8polXBYxVLCkdznviB8erbmobVDr5VkuygQ/acPuVt10kD2OoPzuUMCtx1CrJddjRAda2Nvsv/i7VI6FfyCXfgKrNiID99cL3In2fBOoPLhaeehhjYs3KjWbsY4sqzuEQDOHjvMKnkoYgr6bvHPiFUyolY74MPxBkCEGpTvXStQtpHNDh29J2jaR8xndd/h9G6Rz22zeN3XA== 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=7kRJyPMdOd7MwriRN9pdWg9CsJRbCFe7GQrd6N9YiUM=; b=DN+cxkOiBB+tqqqC+cC8SFAdWeeRGYnJslR5KP2HjyQqppj0auItu5CyATCixazzU+zvN46kMVqJQjUQoJiOfhXws0wHTZz82zSK1Tw7trZmO7EWZIfL/F4OOcU1gU+PQT7lyIwxlNnCLaFsrrjvkmk9mnzTUqQoAaukle9ruE54xwT297WE+A7dwq/UKLQ/V7ByEvquosj3FErgMa62QLlWD7GbJtPteTMad3AxPFvzO2vvrU0KvXsIPMqb9ZJTJAjwY7ri+cFUFABmdD+HqgmJ997adaaGfSmCcvE9e3hlqHlBnU5tmC4KnWd18m7GoBqlrLFXb2KbBCxbyIbsKw== 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=7kRJyPMdOd7MwriRN9pdWg9CsJRbCFe7GQrd6N9YiUM=; b=u3Ne+0T+MqG+R+/oc3Kz1W/N3WtIKkrxGuBHlTHWgOINtSPjpEIWdtQYhrqqK+7fZIaXt4/VpXuisbG6r25KOyAqZdz814xQl+z9cnBonyTqwL45a9aJmCo6+iUH6lPxE+YKLCuL2w47mHMqEuYWBSYWCDt9g0zhbh0N+BBjAW+UAp4H5AFQ76GeZzvNoDpvm47Bb8Ll/ZqtQQMBWwbFjBOTVwXoIhaX1YF95IdTFHPxlt6tooWElf4ZBYXJEZqr6PdRebE4QVxv0l/SMKvuLNeKpGb9qJT1HO4NUA5GABAMvueoetbQpIKed39rLoDu0TC0PKCRC3W/6lSqBNqVjQ== Received: from HE1EUR02FT005.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1d::4d) by HE1EUR02HT126.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1d::187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Mon, 19 Apr 2021 02:06:22 +0000 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com (2a01:111:e400:7e1d::41) by HE1EUR02FT005.mail.protection.outlook.com (2a01:111:e400:7e1d::99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Mon, 19 Apr 2021 02:06:22 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:0A83949482E2115CFC9F9804C2B32756F8AD6C005FF63008B3A4275D90272E28; UpperCasedChecksum:A61FD51E9CEA572A37DAB38FA5F3C89A0363FEF351B634D13FC9AF6C2893BA0D; SizeAsReceived:7596; Count:48 Received: from HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7]) by HE1PR0301MB2154.eurprd03.prod.outlook.com ([fe80::45bb:c44f:2b75:23b7%5]) with mapi id 15.20.4042.024; Mon, 19 Apr 2021 02:06:22 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 19 Apr 2021 04:06:09 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [fOkf3xswYpQoX3oPtmVfmbyBeffr56G+] X-ClientProxiedBy: AM4PR0501CA0051.eurprd05.prod.outlook.com (2603:10a6:200:68::19) To HE1PR0301MB2154.eurprd03.prod.outlook.com (2603:10a6:3:2a::22) X-Microsoft-Original-Message-ID: <20210419020614.92961-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.137.96) by AM4PR0501CA0051.eurprd05.prod.outlook.com (2603:10a6:200:68::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.19 via Frontend Transport; Mon, 19 Apr 2021 02:06:21 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 2241ea60-9bed-466c-e2e0-08d902d7baa0 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UL5of3Fna0zoENiR+FBTuR3hWolNC6uPIEuw9I3fhozbsqwsH6BPN/2Spea6G8RfmFT0CFumG4Bvc5zu3t6Xtjfrup7uh3rrbkgPHaQr2HT2l92LtWotDW6g29J8aagL5yfjIB1Se5/NILKjWCqDWyy4T7gvqfdMBl4NQVAnaGWttzbwdNG8UhOPGri282Hjt9SVu0E6zVQQFV/Z+BcIEFj92Jn58oO+zcv7tSem9vdj335RPJxYj3qkWzpbz+ZIDtju/TEwWbqdg64flNTUHz2+r+iMtf/3UaP/W7SCBFfi3HHIkwcDyJUr6TZRRZZbio403UAn/z3mTfxMq7jfOp2RiV1nOQkJi37DQ/f5hAh3fRXlyu+d9rs69rNmGlm9I/LOA/9peFVCHZ+7HLUhqHTrenDnfNHzGZp6pxgRkEr6FfhRezxsi7l3oM7I4Ed+q+idS5LO1foeTXQwGdk0qER1C1KB7fhVTRuLF5MOVQtBJCq1S9Dw1SpmrYfzy/PSCOYys07Xe7MOc91ic8eyT6GIHott50mEHhTN5MJgRiFeaFTPm+8TsllD4fAW2dGKFL6HjPRB8oY9VGyyHo3UvKqel9M/6wAhaFdERAk1eBVLoXPwNNyonfiHff3J1arKdVBhSdLv5OHZO+1uljktcV/btHC5pcbkXHIlXkWy0GU/w4MO035eP/RbA84lzSTHz+ojc2Bo56x9g== X-MS-TrafficTypeDiagnostic: HE1EUR02HT126: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FMV783bh97ayyP/eFG1Q2XNikMz2HEJ6YpRaEFtDEG35GIwuY0LZ9JuBRcWVN25KwUFbswfbCxnNTn3SzPCDqBmwQMJgwI9uug7ne0wrg+PO2M/dT+2IpIWebPpulveUMpXNrgIZfBZPTj6hbDOte8haxpBjF9inEwrhPoVvnRULvtJwrepY+vXpe0RZO1LX6dSFsTnd7XQBqxJiIjZHKUnG/0lgPAplxmwK4u2nJ5ieZpjppfMrVzsaDv1yN/Al/0xXJ2kjNtkopvoUo90wBuGcEtQ2EOaHFAdkl55dXuE88PKV6HLFOmlyZJhI7gTWf0avqguuBb+OUoN9YTrnYtseHPxtSYZfgqgs3NQtNL1oOmtqSfugEY177I+FMDIicUscWNI9vZy3RHUssGqH+g== X-MS-Exchange-AntiSpam-MessageData: IL9gmp6VJKNAIzbriXLp9l/9PW0n1PR0YRclhv7id0sYWCK1hrAfpSjWlJcrXyJv2Qe6nkJ+zodYErQRtAy9v5jpBd4EIxUe889zQ2Xc4zVpcO/aooKcGuxhpJLA6BUnENz+trD15W1A+hixSQChOA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2241ea60-9bed-466c-e2e0-08d902d7baa0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2021 02:06:22.5844 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR02FT005.eop-EUR02.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: HE1EUR02HT126 Subject: [FFmpeg-devel] [PATCH 2/7] avcodec/avcodec: Document current behaviour of subtitle_header 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: 8L1gpTtDIeSp Content-Length: 1375 Mention that avcodec_free_context() always frees it even when encoding. And mention that freeing is of course performed in avcodec_close() when decoding and not necessarily in avcodec_open2(). Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 8a71c04230..9b68aecd31 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2011,7 +2011,9 @@ typedef struct AVCodecContext { * [Script Info] and [V4+ Styles] section, plus the [Events] line and * the Format line following. It shouldn't include any Dialogue line. * - encoding: Set/allocated/freed by user (before avcodec_open2()) - * - decoding: Set/allocated/freed by libavcodec (by avcodec_open2()) + * - decoding: Set/allocated/freed by libavcodec (by avcodec_open2() + * resp. avcodec_close()) + * Furthermore, avcodec_free_context() always frees it even when encoding. */ uint8_t *subtitle_header; int subtitle_header_size;