1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-04 06:08:26 +02:00

fftools/ffmpeg_opt: reduce indentation in map_auto_subtitle()

Fix indentation after the previous commit. Also use an early return to
save one extra indentation level.
This commit is contained in:
Anton Khirnov 2022-06-20 14:18:37 +02:00
parent 6ab412ef9c
commit 6bd98d9ed8

View File

@ -2584,9 +2584,12 @@ static void map_auto_subtitle(OutputFile *of, AVFormatContext *oc,
OptionsContext *o)
{
char *subtitle_codec_name = NULL;
/* subtitles: pick first */
MATCH_PER_TYPE_OPT(codec_names, str, subtitle_codec_name, oc, "s");
if ((avcodec_find_encoder(oc->oformat->subtitle_codec) || subtitle_codec_name)) {
if (!avcodec_find_encoder(oc->oformat->subtitle_codec) && !subtitle_codec_name)
return;
for (int i = 0; i < nb_input_streams; i++)
if (input_streams[i]->st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) {
AVCodecDescriptor const *input_descriptor =
@ -2614,7 +2617,6 @@ static void map_auto_subtitle(OutputFile *of, AVFormatContext *oc,
}
}
}
}
static int open_output_file(OptionsContext *o, const char *filename)
{