Skip to content

Commit 6b12208

Browse files
committed
fftools/ffmpeg_opt: reindent
1 parent ac3e461 commit 6b12208

File tree

1 file changed

+70
-70
lines changed

1 file changed

+70
-70
lines changed

fftools/ffmpeg_opt.c

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,80 +2635,80 @@ static void map_auto_data(OutputFile *of, AVFormatContext *oc,
26352635
static void map_manual(OutputFile *of, AVFormatContext *oc,
26362636
OptionsContext *o, const StreamMap *map)
26372637
{
2638-
InputStream *ist;
2639-
OutputStream *ost;
2640-
2641-
if (map->disabled)
2642-
return;
2643-
2644-
if (map->linklabel) {
2645-
FilterGraph *fg;
2646-
OutputFilter *ofilter = NULL;
2647-
int j, k;
2648-
2649-
for (j = 0; j < nb_filtergraphs; j++) {
2650-
fg = filtergraphs[j];
2651-
for (k = 0; k < fg->nb_outputs; k++) {
2652-
AVFilterInOut *out = fg->outputs[k]->out_tmp;
2653-
if (out && !strcmp(out->name, map->linklabel)) {
2654-
ofilter = fg->outputs[k];
2655-
goto loop_end;
2656-
}
2657-
}
2638+
InputStream *ist;
2639+
OutputStream *ost;
2640+
2641+
if (map->disabled)
2642+
return;
2643+
2644+
if (map->linklabel) {
2645+
FilterGraph *fg;
2646+
OutputFilter *ofilter = NULL;
2647+
int j, k;
2648+
2649+
for (j = 0; j < nb_filtergraphs; j++) {
2650+
fg = filtergraphs[j];
2651+
for (k = 0; k < fg->nb_outputs; k++) {
2652+
AVFilterInOut *out = fg->outputs[k]->out_tmp;
2653+
if (out && !strcmp(out->name, map->linklabel)) {
2654+
ofilter = fg->outputs[k];
2655+
goto loop_end;
26582656
}
2657+
}
2658+
}
26592659
loop_end:
2660-
if (!ofilter) {
2661-
av_log(NULL, AV_LOG_FATAL, "Output with label '%s' does not exist "
2662-
"in any defined filter graph, or was already used elsewhere.\n", map->linklabel);
2663-
exit_program(1);
2664-
}
2665-
init_output_filter(ofilter, o, oc);
2666-
} else {
2667-
int src_idx = input_files[map->file_index]->ist_index + map->stream_index;
2660+
if (!ofilter) {
2661+
av_log(NULL, AV_LOG_FATAL, "Output with label '%s' does not exist "
2662+
"in any defined filter graph, or was already used elsewhere.\n", map->linklabel);
2663+
exit_program(1);
2664+
}
2665+
init_output_filter(ofilter, o, oc);
2666+
} else {
2667+
int src_idx = input_files[map->file_index]->ist_index + map->stream_index;
26682668

2669-
ist = input_streams[input_files[map->file_index]->ist_index + map->stream_index];
2670-
if (ist->user_set_discard == AVDISCARD_ALL) {
2671-
av_log(NULL, AV_LOG_FATAL, "Stream #%d:%d is disabled and cannot be mapped.\n",
2672-
map->file_index, map->stream_index);
2673-
exit_program(1);
2674-
}
2675-
if(o->subtitle_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE)
2676-
return;
2677-
if(o-> audio_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO)
2678-
return;
2679-
if(o-> video_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
2680-
return;
2681-
if(o-> data_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_DATA)
2682-
return;
2683-
2684-
ost = NULL;
2685-
switch (ist->st->codecpar->codec_type) {
2686-
case AVMEDIA_TYPE_VIDEO: ost = new_video_stream (o, oc, src_idx); break;
2687-
case AVMEDIA_TYPE_AUDIO: ost = new_audio_stream (o, oc, src_idx); break;
2688-
case AVMEDIA_TYPE_SUBTITLE: ost = new_subtitle_stream (o, oc, src_idx); break;
2689-
case AVMEDIA_TYPE_DATA: ost = new_data_stream (o, oc, src_idx); break;
2690-
case AVMEDIA_TYPE_ATTACHMENT: ost = new_attachment_stream(o, oc, src_idx); break;
2691-
case AVMEDIA_TYPE_UNKNOWN:
2692-
if (copy_unknown_streams) {
2693-
ost = new_unknown_stream (o, oc, src_idx);
2694-
break;
2695-
}
2696-
default:
2697-
av_log(NULL, ignore_unknown_streams ? AV_LOG_WARNING : AV_LOG_FATAL,
2698-
"Cannot map stream #%d:%d - unsupported type.\n",
2699-
map->file_index, map->stream_index);
2700-
if (!ignore_unknown_streams) {
2701-
av_log(NULL, AV_LOG_FATAL,
2702-
"If you want unsupported types ignored instead "
2703-
"of failing, please use the -ignore_unknown option\n"
2704-
"If you want them copied, please use -copy_unknown\n");
2705-
exit_program(1);
2706-
}
2707-
}
2708-
if (ost)
2709-
ost->sync_ist = input_streams[ input_files[map->sync_file_index]->ist_index
2710-
+ map->sync_stream_index];
2669+
ist = input_streams[input_files[map->file_index]->ist_index + map->stream_index];
2670+
if (ist->user_set_discard == AVDISCARD_ALL) {
2671+
av_log(NULL, AV_LOG_FATAL, "Stream #%d:%d is disabled and cannot be mapped.\n",
2672+
map->file_index, map->stream_index);
2673+
exit_program(1);
2674+
}
2675+
if(o->subtitle_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE)
2676+
return;
2677+
if(o-> audio_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO)
2678+
return;
2679+
if(o-> video_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
2680+
return;
2681+
if(o-> data_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_DATA)
2682+
return;
2683+
2684+
ost = NULL;
2685+
switch (ist->st->codecpar->codec_type) {
2686+
case AVMEDIA_TYPE_VIDEO: ost = new_video_stream (o, oc, src_idx); break;
2687+
case AVMEDIA_TYPE_AUDIO: ost = new_audio_stream (o, oc, src_idx); break;
2688+
case AVMEDIA_TYPE_SUBTITLE: ost = new_subtitle_stream (o, oc, src_idx); break;
2689+
case AVMEDIA_TYPE_DATA: ost = new_data_stream (o, oc, src_idx); break;
2690+
case AVMEDIA_TYPE_ATTACHMENT: ost = new_attachment_stream(o, oc, src_idx); break;
2691+
case AVMEDIA_TYPE_UNKNOWN:
2692+
if (copy_unknown_streams) {
2693+
ost = new_unknown_stream (o, oc, src_idx);
2694+
break;
2695+
}
2696+
default:
2697+
av_log(NULL, ignore_unknown_streams ? AV_LOG_WARNING : AV_LOG_FATAL,
2698+
"Cannot map stream #%d:%d - unsupported type.\n",
2699+
map->file_index, map->stream_index);
2700+
if (!ignore_unknown_streams) {
2701+
av_log(NULL, AV_LOG_FATAL,
2702+
"If you want unsupported types ignored instead "
2703+
"of failing, please use the -ignore_unknown option\n"
2704+
"If you want them copied, please use -copy_unknown\n");
2705+
exit_program(1);
27112706
}
2707+
}
2708+
if (ost)
2709+
ost->sync_ist = input_streams[ input_files[map->sync_file_index]->ist_index
2710+
+ map->sync_stream_index];
2711+
}
27122712
}
27132713

27142714
static int open_output_file(OptionsContext *o, const char *filename)

0 commit comments

Comments
 (0)