From patchwork Sat Dec 10 22:01:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 1748 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp992857vsa; Sat, 10 Dec 2016 14:01:15 -0800 (PST) X-Received: by 10.28.224.5 with SMTP id x5mr3374909wmg.70.1481407275679; Sat, 10 Dec 2016 14:01:15 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g66si23019843wmf.113.2016.12.10.14.01.15; Sat, 10 Dec 2016 14:01:15 -0800 (PST) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1C6B8689E56; Sun, 11 Dec 2016 00:01:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-1.mx.upcmail.net (vie01a-dmta-pe01-1.mx.upcmail.net [62.179.121.154]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9CE71689E0C for ; Sun, 11 Dec 2016 00:01:02 +0200 (EET) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1cFpha-0007Fm-5Q for ffmpeg-devel@ffmpeg.org; Sat, 10 Dec 2016 23:01:06 +0100 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id JN141u01H0S5wYM01N15h5; Sat, 10 Dec 2016 23:01:06 +0100 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 10 Dec 2016 23:01:04 +0100 Message-Id: <20161210220104.14461-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.11.0 Subject: [FFmpeg-devel] [PATCH] avcodec: Require avoptions for the user to set max_pixels. 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" When we will backport this, it will be inevitably in a different location in AVCodecContext in each release and master. 3.0, 3.1, 3.2 and master use the same soname though and must have a binary compatible interface. It thus can only saftely be accessed through AVOptions It may be enough to require this only in the releases but that could be rather confusing. Signed-off-by: Michael Niedermayer --- libavcodec/avcodec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 02234aee67..8123092ac0 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3573,8 +3573,8 @@ typedef struct AVCodecContext { /** * The number of pixels per image to maximally accept. * - * - decoding: set by user - * - encoding: set by user + * - decoding: set by user through AVOptions (NO direct access) + * - encoding: set by user through AVOptions (NO direct access) */ int64_t max_pixels;