fftools/ffmpeg: simplify init_output_filter()

This commit is contained in:
Anton Khirnov 2023-04-18 14:56:46 +02:00
parent ea4c42779b
commit 4800b50258
1 changed files with 1 additions and 10 deletions

View File

@ -1245,16 +1245,7 @@ static OutputStream *ost_add(Muxer *mux, const OptionsContext *o,
static void init_output_filter(OutputFilter *ofilter, const OptionsContext *o,
Muxer *mux)
{
OutputStream *ost;
switch (ofilter->type) {
case AVMEDIA_TYPE_VIDEO: ost = ost_add(mux, o, AVMEDIA_TYPE_VIDEO, NULL); break;
case AVMEDIA_TYPE_AUDIO: ost = ost_add(mux, o, AVMEDIA_TYPE_AUDIO, NULL); break;
default:
av_log(mux, AV_LOG_FATAL, "Only video and audio filters are supported "
"currently.\n");
exit_program(1);
}
OutputStream *ost = ost_add(mux, o, ofilter->type, NULL);
ost->filter = ofilter;