From 4800b5025820c87d149fda260eb03bf6f66c430c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 18 Apr 2023 14:56:46 +0200 Subject: [PATCH] fftools/ffmpeg: simplify init_output_filter() --- fftools/ffmpeg_mux_init.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 1a63908074..db1f9fa9a6 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -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;