}
choose_sample_rate(ost->st, ost->enc);
codec->time_base = (AVRational){1, codec->sample_rate};
- if (!codec->channels)
+ if (!codec->channels) {
codec->channels = icodec->channels;
+ codec->channel_layout = icodec->channel_layout;
+ }
if (av_get_channel_layout_nb_channels(codec->channel_layout) != codec->channels)
codec->channel_layout = 0;
ost->audio_resample = codec->sample_rate != icodec->sample_rate || audio_sync_method > 1;
return AVERROR(EINVAL);
}
} else {
- show_pix_fmts();
+ opt_pix_fmts(NULL, NULL);
ffmpeg_exit(0);
}
return 0;
}
}
-static void opt_inter_matrix(const char *arg)
+static int opt_inter_matrix(const char *opt, const char *arg)
{
inter_matrix = av_mallocz(sizeof(uint16_t) * 64);
parse_matrix_coeffs(inter_matrix, arg);
+ return 0;
}
-static void opt_intra_matrix(const char *arg)
+static int opt_intra_matrix(const char *opt, const char *arg)
{
intra_matrix = av_mallocz(sizeof(uint16_t) * 64);
parse_matrix_coeffs(intra_matrix, arg);
+ return 0;
}
static void show_usage(void)
printf("\n");
}
-static void show_help(void)
+static int opt_help(const char *opt, const char *arg)
{
AVCodec *c;
AVOutputFormat *oformat = NULL;
}
av_opt_show2(sws_opts, NULL, AV_OPT_FLAG_ENCODING_PARAM|AV_OPT_FLAG_DECODING_PARAM, 0);
+ return 0;
}
static int opt_target(const char *opt, const char *arg)
{
}
-static void opt_passlogfile(const char *arg)
+static int opt_passlogfile(const char *opt, const char *arg)
{
pass_logfilename_prefix = arg;
opt_default("passlogfile", arg);
+ return 0;
}
static const OptionDef options[] = {