diff mbox series

[FFmpeg-devel,18/25] fftools/ffmpeg: simplify init_output_filter()

Message ID 20230419195243.2974-18-anton@khirnov.net
State Accepted
Commit 4800b5025820c87d149fda260eb03bf6f66c430c
Headers show
Series [FFmpeg-devel,01/25] fftools/ffmpeg_filter: drop write-only FilterGraph.reconfiguration | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov April 19, 2023, 7:52 p.m. UTC
---
 fftools/ffmpeg_mux_init.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
diff mbox series

Patch

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;