avformat: Remove deprecated av_demuxer_open()
Deprecate in e37f161e66.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
committed by
James Almer
parent
e8876bdcf3
commit
0a071f7124
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user