summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-05-06 15:01:33 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-05-10 07:27:36 +0200
commit7547f135485623e00844d2ad40debb5b048e6b5d (patch)
treef8ea9c5a584452ce4cc0a0e89bda658fa50c3fe8 /libavformat/utils.c
parent5130bbb7efe1125c515eddedc0985fa9b6e5d731 (diff)
downloadffmpeg-7547f135485623e00844d2ad40debb5b048e6b5d.tar.gz
avformat/utils: Move ff_stream_add_bitstream_filter to mux.c
It is muxing-only; in fact, it should be considered part of the core muxing code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index a905838468..fcee417c4e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1776,49 +1776,6 @@ uint8_t *av_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type,
return data;
}
-int ff_stream_add_bitstream_filter(AVStream *st, const char *name, const char *args)
-{
- int ret;
- const AVBitStreamFilter *bsf;
- FFStream *const sti = ffstream(st);
- AVBSFContext *bsfc;
-
- av_assert0(!sti->bsfc);
-
- if (!(bsf = av_bsf_get_by_name(name))) {
- av_log(NULL, AV_LOG_ERROR, "Unknown bitstream filter '%s'\n", name);
- return AVERROR_BSF_NOT_FOUND;
- }
-
- if ((ret = av_bsf_alloc(bsf, &bsfc)) < 0)
- return ret;
-
- bsfc->time_base_in = st->time_base;
- if ((ret = avcodec_parameters_copy(bsfc->par_in, st->codecpar)) < 0) {
- av_bsf_free(&bsfc);
- return ret;
- }
-
- if (args && bsfc->filter->priv_class) {
- if ((ret = av_set_options_string(bsfc->priv_data, args, "=", ":")) < 0) {
- av_bsf_free(&bsfc);
- return ret;
- }
- }
-
- if ((ret = av_bsf_init(bsfc)) < 0) {
- av_bsf_free(&bsfc);
- return ret;
- }
-
- sti->bsfc = bsfc;
-
- av_log(NULL, AV_LOG_VERBOSE,
- "Automatically inserted bitstream filter '%s'; args='%s'\n",
- name, args ? args : "");
- return 1;
-}
-
int ff_format_output_open(AVFormatContext *s, const char *url, AVDictionary **options)
{
if (!s->oformat)