aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-03 13:54:45 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-03 16:08:19 +0200
commitf3f9041302203e458d720028e6f82fb4fb51d8e1 (patch)
tree0183cefb31bbc6bebbca008a58e9c5ba0c9367bb
parent11d39873abcddf2f1aad2cdfadccbdb41b80d5af (diff)
downloadffmpeg-f3f9041302203e458d720028e6f82fb4fb51d8e1.tar.gz
fftools: Remove remnants of resample_opts
These were intended to pass options to auto-inserted avresample resampling filters. Yet FFmpeg uses swresample for this purpose (with its own AVDictionary swr_opts similar to resample_opts). Therefore said options were not forwarded any more since commit 911417f0b34e611bf084319c5b5a4e4e630da940; moreover since commit 420cedd49745b284c35d97b936b71ff79b43bdf7 avresample options are not even recognized and ignored any more. Yet there are still remnants of all of this. This commit gets rid of them. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--fftools/cmdutils.c8
-rw-r--r--fftools/cmdutils.h3
-rw-r--r--fftools/ffmpeg.c1
-rw-r--r--fftools/ffmpeg.h1
-rw-r--r--fftools/ffmpeg_filter.c9
-rw-r--r--fftools/ffmpeg_opt.c2
6 files changed, 3 insertions, 21 deletions
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index ae341184f6..c0d802dd52 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -68,7 +68,7 @@ static int init_report(const char *env);
AVDictionary *sws_dict;
AVDictionary *swr_opts;
-AVDictionary *format_opts, *codec_opts, *resample_opts;
+AVDictionary *format_opts, *codec_opts;
static FILE *report_file;
static int report_file_level = AV_LOG_DEBUG;
@@ -86,7 +86,6 @@ void uninit_opts(void)
av_dict_free(&sws_dict);
av_dict_free(&format_opts);
av_dict_free(&codec_opts);
- av_dict_free(&resample_opts);
}
void log_callback_help(void *ptr, int level, const char *fmt, va_list vl)
@@ -657,11 +656,9 @@ static void finish_group(OptionParseContext *octx, int group_idx,
g->swr_opts = swr_opts;
g->codec_opts = codec_opts;
g->format_opts = format_opts;
- g->resample_opts = resample_opts;
codec_opts = NULL;
format_opts = NULL;
- resample_opts = NULL;
sws_dict = NULL;
swr_opts = NULL;
@@ -714,7 +711,6 @@ void uninit_parse_context(OptionParseContext *octx)
av_freep(&l->groups[j].opts);
av_dict_free(&l->groups[j].codec_opts);
av_dict_free(&l->groups[j].format_opts);
- av_dict_free(&l->groups[j].resample_opts);
av_dict_free(&l->groups[j].sws_dict);
av_dict_free(&l->groups[j].swr_opts);
@@ -826,7 +822,7 @@ do { \
return AVERROR_OPTION_NOT_FOUND;
}
- if (octx->cur_group.nb_opts || codec_opts || format_opts || resample_opts)
+ if (octx->cur_group.nb_opts || codec_opts || format_opts)
av_log(NULL, AV_LOG_WARNING, "Trailing option(s) found in the "
"command: may be ignored.\n");
diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h
index 0330ee3509..9caad01865 100644
--- a/fftools/cmdutils.h
+++ b/fftools/cmdutils.h
@@ -48,7 +48,7 @@ extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
extern AVFormatContext *avformat_opts;
extern AVDictionary *sws_dict;
extern AVDictionary *swr_opts;
-extern AVDictionary *format_opts, *codec_opts, *resample_opts;
+extern AVDictionary *format_opts, *codec_opts;
extern int hide_banner;
/**
@@ -323,7 +323,6 @@ typedef struct OptionGroup {
AVDictionary *codec_opts;
AVDictionary *format_opts;
- AVDictionary *resample_opts;
AVDictionary *sws_dict;
AVDictionary *swr_opts;
} OptionGroup;
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index b0ce7c7c32..c3df955a6a 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -4926,7 +4926,6 @@ static int transcode(void)
av_dict_free(&ost->encoder_opts);
av_dict_free(&ost->sws_dict);
av_dict_free(&ost->swr_opts);
- av_dict_free(&ost->resample_opts);
}
}
}
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index d2dd7ca092..b21a2376d2 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -523,7 +523,6 @@ typedef struct OutputStream {
AVDictionary *encoder_opts;
AVDictionary *sws_dict;
AVDictionary *swr_opts;
- AVDictionary *resample_opts;
char *apad;
OSTFinished finished; /* no more packets should be written for this stream */
int unavailable; /* true if the steram is unavailable (possibly temporarily) */
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 21d54cc8ae..4b9ad3071b 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -995,15 +995,6 @@ int configure_filtergraph(FilterGraph *fg)
if (strlen(args))
args[strlen(args)-1] = 0;
av_opt_set(fg->graph, "aresample_swr_opts", args, 0);
-
- args[0] = '\0';
- e = NULL;
- while ((e = av_dict_get(fg->outputs[0]->ost->resample_opts, "", e,
- AV_DICT_IGNORE_SUFFIX))) {
- av_strlcatf(args, sizeof(args), "%s=%s:", e->key, e->value);
- }
- if (strlen(args))
- args[strlen(args) - 1] = '\0';
} else {
fg->graph->nb_threads = filter_complex_nbthreads;
}
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 428934a3d8..bd8f26ce2f 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1628,8 +1628,6 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
if (ost->enc && av_get_exact_bits_per_sample(ost->enc->id) == 24)
av_dict_set(&ost->swr_opts, "output_sample_bits", "24", 0);
- av_dict_copy(&ost->resample_opts, o->g->resample_opts, 0);
-
ost->source_index = source_index;
if (source_index >= 0) {
ost->sync_ist = input_streams[source_index];