diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-04-14 00:29:37 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-04-27 10:43:10 -0300 |
commit | 0a071f7124beaf0929f772a8618ac1b6c17b0222 (patch) | |
tree | fee26a376056ffed26249617a3c1104cf7850d62 /libavformat | |
parent | e8876bdcf3b4a8e5320884ffb9d39ce30e23f0e6 (diff) | |
download | ffmpeg-0a071f7124beaf0929f772a8618ac1b6c17b0222.tar.gz |
avformat: Remove deprecated av_demuxer_open()
Deprecate in e37f161e66e042d6c2c7470c4d9881df9427fc4a.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avformat.h | 10 | ||||
-rw-r--r-- | libavformat/utils.c | 29 | ||||
-rw-r--r-- | libavformat/version.h | 3 |
3 files changed, 1 insertions, 41 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 6658a0f315..272370db2a 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1276,7 +1276,7 @@ typedef struct AVFormatContext { #define AVFMT_FLAG_BITEXACT 0x0400 #define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) #if FF_API_LAVF_PRIV_OPT -#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (deprecated, will do nothing once av_demuxer_open() is removed) +#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (deprecated, does nothing) #endif #define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats #define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops. @@ -2017,14 +2017,6 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt, int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options); -#if FF_API_DEMUXER_OPEN -/** - * @deprecated Use an AVDictionary to pass options to a demuxer. - */ -attribute_deprecated -int av_demuxer_open(AVFormatContext *ic); -#endif - /** * Read packets of a media file to get stream information. This * is useful for file formats with no headers such as MPEG. This diff --git a/libavformat/utils.c b/libavformat/utils.c index d8b44ce896..ba664f6214 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -370,27 +370,6 @@ FF_ENABLE_DEPRECATION_WARNINGS /************************************************************/ /* input media file */ -#if FF_API_DEMUXER_OPEN -int av_demuxer_open(AVFormatContext *ic) { - int err; - - if (ic->format_whitelist && av_match_list(ic->iformat->name, ic->format_whitelist, ',') <= 0) { - av_log(ic, AV_LOG_ERROR, "Format not on whitelist \'%s\'\n", ic->format_whitelist); - return AVERROR(EINVAL); - } - - if (ic->iformat->read_header) { - err = ic->iformat->read_header(ic); - if (err < 0) - return err; - } - - if (ic->pb && !ic->internal->data_offset) - ic->internal->data_offset = avio_tell(ic->pb); - - return 0; -} -#endif /* Open input file and probe the format if necessary. */ static int init_input(AVFormatContext *s, const char *filename, AVDictionary **options) @@ -603,11 +582,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, if (s->pb) ff_id3v2_read_dict(s->pb, &s->internal->id3v2_meta, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta); -#if FF_API_DEMUXER_OPEN - if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->iformat->read_header) -#else if (s->iformat->read_header) -#endif if ((ret = s->iformat->read_header(s)) < 0) goto fail; @@ -636,11 +611,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, if ((ret = avformat_queue_attached_pictures(s)) < 0) goto close; -#if FF_API_DEMUXER_OPEN - if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->pb && !s->internal->data_offset) -#else if (s->pb && !s->internal->data_offset) -#endif s->internal->data_offset = avio_tell(s->pb); s->internal->raw_packet_buffer_remaining_size = RAW_PACKET_BUFFER_SIZE; diff --git a/libavformat/version.h b/libavformat/version.h index 085b5236c3..719d56c412 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -58,9 +58,6 @@ #ifndef FF_API_LAVF_AVCTX #define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59) #endif -#ifndef FF_API_DEMUXER_OPEN -#define FF_API_DEMUXER_OPEN (LIBAVFORMAT_VERSION_MAJOR < 59) -#endif #ifndef FF_API_CHAPTER_ID_INT #define FF_API_CHAPTER_ID_INT (LIBAVFORMAT_VERSION_MAJOR < 59) #endif |