early-access version 1680
This commit is contained in:
5
externals/ffmpeg/fftools/cmdutils.c
vendored
5
externals/ffmpeg/fftools/cmdutils.c
vendored
@@ -202,13 +202,14 @@ void show_help_options(const OptionDef *options, const char *msg, int req_flags,
|
||||
|
||||
void show_help_children(const AVClass *class, int flags)
|
||||
{
|
||||
const AVClass *child = NULL;
|
||||
void *iter = NULL;
|
||||
const AVClass *child;
|
||||
if (class->option) {
|
||||
av_opt_show2(&class, NULL, flags, 0);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
while (child = av_opt_child_class_next(class, child))
|
||||
while (child = av_opt_child_class_iterate(class, &iter))
|
||||
show_help_children(child, flags);
|
||||
}
|
||||
|
||||
|
3
externals/ffmpeg/fftools/ffmpeg.h
vendored
3
externals/ffmpeg/fftools/ffmpeg.h
vendored
@@ -229,6 +229,8 @@ typedef struct OptionsContext {
|
||||
int nb_time_bases;
|
||||
SpecifierOpt *enc_time_bases;
|
||||
int nb_enc_time_bases;
|
||||
SpecifierOpt *autoscale;
|
||||
int nb_autoscale;
|
||||
} OptionsContext;
|
||||
|
||||
typedef struct InputFilter {
|
||||
@@ -479,6 +481,7 @@ typedef struct OutputStream {
|
||||
int force_fps;
|
||||
int top_field_first;
|
||||
int rotate_overridden;
|
||||
int autoscale;
|
||||
double rotate_override_value;
|
||||
|
||||
AVRational frame_aspect_ratio;
|
||||
|
2
externals/ffmpeg/fftools/ffmpeg_filter.c
vendored
2
externals/ffmpeg/fftools/ffmpeg_filter.c
vendored
@@ -470,7 +470,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (ofilter->width || ofilter->height) {
|
||||
if ((ofilter->width || ofilter->height) && ofilter->ost->autoscale) {
|
||||
char args[255];
|
||||
AVFilterContext *filter;
|
||||
AVDictionaryEntry *e = NULL;
|
||||
|
6
externals/ffmpeg/fftools/ffmpeg_opt.c
vendored
6
externals/ffmpeg/fftools/ffmpeg_opt.c
vendored
@@ -62,6 +62,7 @@ static const char *opt_name_hwaccels[] = {"hwaccel", NULL};
|
||||
static const char *opt_name_hwaccel_devices[] = {"hwaccel_device", NULL};
|
||||
static const char *opt_name_hwaccel_output_formats[] = {"hwaccel_output_format", NULL};
|
||||
static const char *opt_name_autorotate[] = {"autorotate", NULL};
|
||||
static const char *opt_name_autoscale[] = {"autoscale", NULL};
|
||||
static const char *opt_name_max_frames[] = {"frames", "aframes", "vframes", "dframes", NULL};
|
||||
static const char *opt_name_bitstream_filters[] = {"bsf", "absf", "vbsf", NULL};
|
||||
static const char *opt_name_codec_tags[] = {"tag", "atag", "vtag", "stag", NULL};
|
||||
@@ -1462,6 +1463,8 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
|
||||
ost->encoder_opts = filter_codec_opts(o->g->codec_opts, ost->enc->id, oc, st, ost->enc);
|
||||
|
||||
MATCH_PER_STREAM_OPT(presets, str, preset, oc, st);
|
||||
ost->autoscale = 1;
|
||||
MATCH_PER_STREAM_OPT(autoscale, i, ost->autoscale, oc, st);
|
||||
if (preset && (!(ret = get_preset_file_2(preset, ost->enc->name, &s)))) {
|
||||
do {
|
||||
buf = get_line(s);
|
||||
@@ -3664,6 +3667,9 @@ const OptionDef options[] = {
|
||||
{ "autorotate", HAS_ARG | OPT_BOOL | OPT_SPEC |
|
||||
OPT_EXPERT | OPT_INPUT, { .off = OFFSET(autorotate) },
|
||||
"automatically insert correct rotate filters" },
|
||||
{ "autoscale", HAS_ARG | OPT_BOOL | OPT_SPEC |
|
||||
OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(autoscale) },
|
||||
"automatically insert a scale filter at the end of the filter graph" },
|
||||
|
||||
/* audio options */
|
||||
{ "aframes", OPT_AUDIO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_audio_frames },
|
||||
|
8
externals/ffmpeg/fftools/ffprobe.c
vendored
8
externals/ffmpeg/fftools/ffprobe.c
vendored
@@ -2854,7 +2854,7 @@ static int open_input_file(InputFile *ifile, const char *filename,
|
||||
{
|
||||
int err, i;
|
||||
AVFormatContext *fmt_ctx = NULL;
|
||||
AVDictionaryEntry *t;
|
||||
AVDictionaryEntry *t = NULL;
|
||||
int scan_all_pmts_set = 0;
|
||||
|
||||
fmt_ctx = avformat_alloc_context();
|
||||
@@ -2879,10 +2879,8 @@ static int open_input_file(InputFile *ifile, const char *filename,
|
||||
ifile->fmt_ctx = fmt_ctx;
|
||||
if (scan_all_pmts_set)
|
||||
av_dict_set(&format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE);
|
||||
if ((t = av_dict_get(format_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key);
|
||||
return AVERROR_OPTION_NOT_FOUND;
|
||||
}
|
||||
while ((t = av_dict_get(format_opts, "", t, AV_DICT_IGNORE_SUFFIX)))
|
||||
av_log(NULL, AV_LOG_WARNING, "Option %s skipped - not known to demuxer.\n", t->key);
|
||||
|
||||
if (find_stream_info) {
|
||||
AVDictionary **opts = setup_find_stream_info_opts(fmt_ctx, codec_opts);
|
||||
|
Reference in New Issue
Block a user