summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-10-13 15:39:47 +0200
committerAnton Khirnov <anton@khirnov.net>2022-10-18 13:57:43 +0200
commit9f9bf8703b919dad486cb3a009eba5db6fa756a9 (patch)
tree3c826d709f78d741bd84eac1ac7faa5918235074 /fftools/ffmpeg.c
parentee0a900e5817148c8343f8f95e7b811b069704f4 (diff)
fftools/ffmpeg: move init_output_bsfs() to ffmpeg_mux
Bitstream filtering is done as a part of muxing, so this is the more proper place for this.
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r--fftools/ffmpeg.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 9bb877fb34..46d2912d07 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2651,35 +2651,6 @@ static int compare_int64(const void *a, const void *b)
return FFDIFFSIGN(*(const int64_t *)a, *(const int64_t *)b);
}
-static int init_output_bsfs(OutputStream *ost)
-{
- AVBSFContext *ctx = ost->bsf_ctx;
- int ret;
-
- if (!ctx)
- return 0;
-
- ret = avcodec_parameters_copy(ctx->par_in, ost->st->codecpar);
- if (ret < 0)
- return ret;
-
- ctx->time_base_in = ost->st->time_base;
-
- ret = av_bsf_init(ctx);
- if (ret < 0) {
- av_log(NULL, AV_LOG_ERROR, "Error initializing bitstream filter: %s\n",
- ctx->filter->name);
- return ret;
- }
-
- ret = avcodec_parameters_copy(ost->st->codecpar, ctx->par_out);
- if (ret < 0)
- return ret;
- ost->st->time_base = ctx->time_base_out;
-
- return 0;
-}
-
static int init_output_stream_streamcopy(OutputStream *ost)
{
OutputFile *of = output_files[ost->file_index];
@@ -3212,13 +3183,6 @@ static int init_output_stream(OutputStream *ost, AVFrame *frame,
return ret;
}
- /* initialize bitstream filters for the output stream
- * needs to be done here, because the codec id for streamcopy is not
- * known until now */
- ret = init_output_bsfs(ost);
- if (ret < 0)
- return ret;
-
ret = of_stream_init(output_files[ost->file_index], ost);
if (ret < 0)
return ret;