From: Anton Khirnov <anton@khirnov.net> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 3/4] lavf: deprecate av_stream_get_parser() Date: Thu, 18 Aug 2022 15:46:04 +0200 Message-ID: <20220818134605.12583-3-anton@khirnov.net> (raw) In-Reply-To: <20220818134605.12583-1-anton@khirnov.net> It retrieves an AVStream's internal parser, whose state is not well-defined from the caller's point of view. This function was added for ffmpeg.c, which is no longer using it. As there is no valid use for this function, deprecate it without replacement. --- doc/APIchanges | 3 ++- libavformat/avformat.h | 3 +++ libavformat/demux_utils.c | 2 ++ libavformat/version_major.h | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index bc355b59ed..078f9de223 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,7 +15,8 @@ libavutil: 2021-04-27 API changes, most recent first: 2022-08-xx - xxxxxxxxxx - lavf 59 - avformat.h - Deprecate av_stream_get_end_pts() without replacement. + Deprecate av_stream_get_end_pts() and av_stream_get_parser() + without replacement. 2022-08-07 - e95b08a7dd - lavu 57.33.101 - pixfmt.h Add AV_PIX_FMT_RGBAF16{BE,LE} pixel formats. diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 9d46875cce..7c36972735 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1119,7 +1119,10 @@ typedef struct AVStream { int pts_wrap_bits; } AVStream; +#if FF_API_STREAM_GET_PARSER +attribute_deprecated struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); +#endif #if FF_API_GET_END_PTS /** diff --git a/libavformat/demux_utils.c b/libavformat/demux_utils.c index 56cc6e15d8..d8cbcb630c 100644 --- a/libavformat/demux_utils.c +++ b/libavformat/demux_utils.c @@ -29,10 +29,12 @@ #include "demux.h" #include "internal.h" +#if FF_API_STREAM_GET_PARSER struct AVCodecParserContext *av_stream_get_parser(const AVStream *st) { return cffstream(st)->parser; } +#endif void avpriv_stream_set_need_parsing(AVStream *st, enum AVStreamParseType type) { diff --git a/libavformat/version_major.h b/libavformat/version_major.h index 099a17873f..2747767768 100644 --- a/libavformat/version_major.h +++ b/libavformat/version_major.h @@ -47,6 +47,7 @@ #define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60) #define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59) #define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 60) +#define FF_API_STREAM_GET_PARSER (LIBAVFORMAT_VERSION_MAJOR < 60) #define FF_API_R_FRAME_RATE 1 -- 2.35.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-08-18 13:46 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-18 13:46 [FFmpeg-devel] [PATCH 1/4] lavf: deprecate av_stream_get_end_pts() Anton Khirnov 2022-08-18 13:46 ` [FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg: stop using av_stream_get_parser() Anton Khirnov 2022-08-18 13:58 ` Andreas Rheinhardt 2022-08-18 16:44 ` James Almer 2022-08-18 17:08 ` Andreas Rheinhardt 2022-08-18 14:14 ` Anton Khirnov 2022-08-18 14:34 ` Andreas Rheinhardt 2022-08-18 15:19 ` Michael Niedermayer 2022-08-18 13:46 ` Anton Khirnov [this message] 2022-08-18 13:46 ` [FFmpeg-devel] [PATCH 4/4] fftools/ffmpeg: call av_guess_frame_rate() when opening the file Anton Khirnov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220818134605.12583-3-anton@khirnov.net \ --to=anton@khirnov.net \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git