From patchwork Thu Apr 2 04:57:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 18577 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 EE0FB4493BF for ; Thu, 2 Apr 2020 07:57:18 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D05C968A1AE; Thu, 2 Apr 2020 07:57:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 02B41687EC8 for ; Thu, 2 Apr 2020 07:57:12 +0300 (EEST) Received: by mail-wr1-f41.google.com with SMTP id 31so2601125wrs.3 for ; Wed, 01 Apr 2020 21:57:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Mc4AB/jGrW1jLhC0s4Ih/5WeFo/37DNJz7G/wmFnvh4=; b=Aco7DWrJtXwpcwfdc3Obbj8jaLliOEd53DF3ckw1pCQrqq5soz1Vjei4lLWwPNKvFQ zWeepAvpCvL0EDUaVEyVrvhoCh6n7Bx2za7SEJA3ykFZXqFWiT0wiaLDLoewBlQ/H82k MBoxoiNLpOhoPvWKeHET2QGFDU7k+IObAd5fKyE/i02OCm2NfoxBCV1MpRO4TA6nM5G8 o0wKJBMvmndX8rp7+MgpJpLvhb2o4VGY4r3cp9UKLY60DXJkJvBq1E+Sqp3qBxMZze+o EH4b47md3/wKUTaVCtzDgFf/iHoGJ6IelKZFi6jVW01Ae2wkqMDQsmx7TsULPFdC64p8 TWvw== 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:mime-version :content-transfer-encoding; bh=Mc4AB/jGrW1jLhC0s4Ih/5WeFo/37DNJz7G/wmFnvh4=; b=CTktsDl0ITQ8YK9Ptn/DLYdhm5MuKKhUIgGkowPESKCOyvOI01stJS1+9a7di89rlJ 2oU3X7+yb1NBeFGY8VexyliiFZquQAVISHUeKc3ZH38uOOu3uPxPSzP4M644uIyl6YPK vwOI7pNiR4BB2Dc6XL4rWMv2/tuRfhLY6qHniQF7hf1VDZ8lvWFpnKLLDNaNpg7QDU7K Pq7e8YIXh8UkuGBO7+pAkpuSpt5Bc1lGNR6yls3zh5U8oRJyVPooekfnCeRs4gNNWCOL dJeRSAyLVAzV0J+JSeg/Z0gm91itgQYpMXf+FjlSL0WrXF7NTBQMsZ7xyLFxSNKYh4yl pZ9Q== X-Gm-Message-State: AGi0Pubk+8HGUVZycrNXBR0WMDv1y27ohIAlXuy+ItglzTi+7DXqEF8v P+9SB9cmjrXrdNRbuOKKCK3oYTHk X-Google-Smtp-Source: APiQypJbWZtvtDS45lyEY3PMD1McRrU4VzthBR6+ryBSv87jN806yB4GPlV+Qe/l1M/SwW/VgZXFcg== X-Received: by 2002:adf:bbcd:: with SMTP id z13mr1404579wrg.389.1585803430695; Wed, 01 Apr 2020 21:57:10 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1ab57.dynamic.kabel-deutschland.de. [188.193.171.87]) by smtp.gmail.com with ESMTPSA id m11sm5574434wmf.9.2020.04.01.21.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 21:57:10 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 2 Apr 2020 06:57:04 +0200 Message-Id: <20200402045704.24445-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/avformat: Deprecate AVFMT_FLAG_PRIV_OPT 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" This flag was added in 492026209 in conjunction with av_demuxer_open() to allow to pass private options to demuxers. It worked as follows: av_open_input_stream() (the predecessor of avformat_open_input()) would not call the read_header function if this flag is set. Instead the user could set private options of the demuxer via the format's private class after avformat_open_input() and then call av_demuxer_open() which called the format's read_header function. This approach was abandoned in e37f161e and av_demuxer_open() deprecated; instead the AVDictionary based way of passing private options to the demuxer was choosen. Yet AVFMT_FLAG_PRIV_OPT has never been deprecated (and av_demuxer_open() never removed). This commit implements the deprecation. Given that av_demuxer_open() has been deprecated in 2012 and that this flag is useless without it, the flag is slated to be ignored at the next major version bump. Signed-off-by: Andreas Rheinhardt --- I really wonder how av_demuxer_open() could survive that long despite having been deprecated more than eight years ago. Is it because it was just deprecated, but without any #if around it to be slated for removal? doc/APIchanges | 4 ++++ libavformat/avformat.h | 2 +- libavformat/version.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index f1d7eac2ee..c7ce019b1a 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,10 @@ libavutil: 2017-10-21 API changes, most recent first: +2020-04-02 - xxxxxxxxxx - lavf 58.43.100 - avformat.h + Deprecate AVFMT_FLAG_PRIV_OPT. It will be ignored after the next + major bump and avformat_open_input() will behave as if it were unset. + 2020-03-29 - xxxxxxxxxx - lavf 58.42.100 - avformat.h av_read_frame() now guarantees to handle uninitialized input packets and to return refcounted packets on success. diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 39b99b4481..b7049b69a0 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1489,7 +1489,7 @@ typedef struct AVFormatContext { #define AVFMT_FLAG_MP4A_LATM 0x8000 ///< Deprecated, does nothing. #endif #define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) -#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted) +#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open; deprecated. #if FF_API_LAVF_KEEPSIDE_FLAG #define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Deprecated, does nothing. #endif diff --git a/libavformat/version.h b/libavformat/version.h index 18c2f5fec2..493a0b337f 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,7 +32,7 @@ // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 58 -#define LIBAVFORMAT_VERSION_MINOR 42 +#define LIBAVFORMAT_VERSION_MINOR 43 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \