From patchwork Wed May 20 12:52:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 19781 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id A561944AC9B for ; Wed, 20 May 2020 15:52:35 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8821E68A79B; Wed, 20 May 2020 15:52:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.red.khirnov.net (unknown [176.97.15.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A7DB368798D for ; Wed, 20 May 2020 15:52:28 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail.red.khirnov.net (Postfix) with ESMTP id E0C2B28A488 for ; Wed, 20 May 2020 14:52:27 +0200 (CEST) Received: from mail.red.khirnov.net ([IPv6:::1]) by localhost (mail.red.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id FwB_AUfSTv_N for ; Wed, 20 May 2020 14:52:12 +0200 (CEST) Received: from quelana.khirnov.net (unknown [IPv6:2a00:c500:61:23b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "quelana.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail.red.khirnov.net (Postfix) with ESMTPS id B4BAE28A36B for ; Wed, 20 May 2020 14:52:12 +0200 (CEST) Received: from localhost (quelana.khirnov.net [IPv6:::1]) by quelana.khirnov.net (Postfix) with ESMTP id 8B1ED22554 for ; Wed, 20 May 2020 14:52:12 +0200 (CEST) Received: from quelana.khirnov.net ([IPv6:::1]) by localhost (quelana.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id l7FR2KMR-JW0 for ; Wed, 20 May 2020 14:52:11 +0200 (CEST) Received: from libav.daenerys.khirnov.net (libav.daenerys.khirnov.net [IPv6:2a00:c500:561:201::7]) by quelana.khirnov.net (Postfix) with ESMTP id 643D820279 for ; Wed, 20 May 2020 14:52:11 +0200 (CEST) Received: by libav.daenerys.khirnov.net (Postfix, from userid 1000) id 51BB620E00A8; Wed, 20 May 2020 14:52:08 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 May 2020 14:52:06 +0200 Message-Id: <20200520125206.18834-1-anton@khirnov.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec: improve avcodec_receive_frame() doxy X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Make it clear that the returned reference is owned by the caller. --- libavcodec/avcodec.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index c9baf859ac..cadd213301 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3728,10 +3728,10 @@ int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt); * Return decoded output data from a decoder. * * @param avctx codec context - * @param frame This will be set to a reference-counted video or audio - * frame (depending on the decoder type) allocated by the - * decoder. Note that the function will always call - * av_frame_unref(frame) before doing anything else. + * @param frame This parameter should point to a "clean" (unallocated) frame, + * into which the decoder will write a reference to the decoded + * frame. The returned reference is owned by the caller and must be + * freed with av_frame_unref(). * * @return * 0: success, a frame was returned