From patchwork Sun Mar 7 00:15:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 26237 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 E867A449AD5 for ; Sun, 7 Mar 2021 02:16:15 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C2341689A91; Sun, 7 Mar 2021 02:16:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D5C88687F3F for ; Sun, 7 Mar 2021 02:16:08 +0200 (EET) Received: by mail-ej1-f52.google.com with SMTP id w1so12321799ejf.11 for ; Sat, 06 Mar 2021 16:16:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:reply-to:mime-version :content-transfer-encoding; bh=OMe8pccLRyA1tTSCHnyfLYXZ5wTwd7f9yy9/xxnzXv0=; b=EYSmHsHHEkrR8yd3M23uCaf58hI1nQSUT6daa6sJwW7iSvNOyAyRElP4NCHbqHRQ/Q wgJvEC2SXp7EMOG5pwyMJnIIBuABOfSVk6io8Zjx3qgJBcpLZmfVna5RCHFgwkP30Msg zIbivae2CKORjd9lTM5WmeXFTCDqcqVleoRA8sORPOVkKiaU8WNgqR3RcBceLOiZ/PhG c5HRwspJnsW5kWA5R3UOMUFOxStmIkMaD5PAsYWHGLHUot5R2IIQ/Qa4aQ7VRhY10aCN dkeIN6LZj9qC4BL2CydtRtYCRpJn7qEsUUVTLWe6Qqb66voVNZ0g5DWocKClyQdEwvAC cgnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :mime-version:content-transfer-encoding; bh=OMe8pccLRyA1tTSCHnyfLYXZ5wTwd7f9yy9/xxnzXv0=; b=p2V40j3TRXPqnVPw/Vu0DHeayb2dxDkeYLkgqofMwxFFW58LKmy9qBkZru/FVr6KWF 5kXV+ey4egDW8Ap+z6lCjyCt4jv6I1jKed2EVcpAc+t31VPTxnz2LJuQx9+ncC6XJL/x 7jWJpuipIpgBK6SPhERDt/1PnBmcoAFdGxjVtYF9mMGyjzfEQhR9506jIJPoPX+TMd+l 2Hlajxf82R3/Pkjc/FjzchFAvzEzJ83149iucpFv2RVltulQ9e+pMvS+ofzZt815AqeQ dD3oZaDbCEzok/QFMMRVeqVAWeWB9bOmIQK5Ikw+TXbG82fnK16CSiT/1ndqvi39fEFH COpA== X-Gm-Message-State: AOAM530UlLKvZO16ae/uIPuq+t3lF4r56xXbNzzdUeWb6uva0gVwMXlc qwyVCIrV409t418IUrAFAHLVdjx4ll0= X-Google-Smtp-Source: ABdhPJw4EW4DFAMjLePSn9Q1VvS3V4O47ZX6Z/EAMwn5lrNkvj4zxb26g3h9PuKA1CxroAr+lgrn4g== X-Received: by 2002:a17:906:75a:: with SMTP id z26mr8624106ejb.22.1615076168176; Sat, 06 Mar 2021 16:16:08 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id b12sm4325421eds.94.2021.03.06.16.16.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Mar 2021 16:16:07 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 7 Mar 2021 01:15:57 +0100 Message-Id: <20210307001601.2126517-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/5] avcodec/avcodec: Don't suggest calling deprecated avcodec_register_all() 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Despite avcodec_register and avcodec_register_all being deprecated, their documentation still said that one of them has to be called before doing anything else. Clarify this confusing situation. Furthermore, don't use avcodec_register_all in sample code for a non-deprecated function. Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.h | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 309d9965be..46d31b34ad 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2708,25 +2708,13 @@ const char *avcodec_license(void); #if FF_API_NEXT /** - * Register the codec codec and initialize libavcodec. - * - * @warning either this function or avcodec_register_all() must be called - * before any other libavcodec functions. - * - * @see avcodec_register_all() + * @deprecated Calling this function is unnecessary. */ attribute_deprecated void avcodec_register(AVCodec *codec); /** - * Register all the codecs, parsers and bitstream filters which were enabled at - * configuration time. If you do not call this function you can select exactly - * which formats you want to support, by using the individual registration - * functions. - * - * @see avcodec_register - * @see av_register_codec_parser - * @see av_register_bitstream_filter + * @deprecated Calling this function is unnecessary. */ attribute_deprecated void avcodec_register_all(void); @@ -2843,7 +2831,6 @@ int avcodec_parameters_to_context(AVCodecContext *codec, * @ref avcodec_receive_frame()). * * @code - * avcodec_register_all(); * av_dict_set(&opts, "b", "2.5M", 0); * codec = avcodec_find_decoder(AV_CODEC_ID_H264); * if (!codec)