diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-04-18 14:56:46 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-04-24 16:56:06 +0200 |
commit | 4800b5025820c87d149fda260eb03bf6f66c430c (patch) | |
tree | d7020b531187a15ed9503c5a45c254c3d8826e8e /fftools | |
parent | ea4c42779b42a27e088f060db1fd7d768f3ce598 (diff) | |
download | ffmpeg-4800b5025820c87d149fda260eb03bf6f66c430c.tar.gz |
fftools/ffmpeg: simplify init_output_filter()
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg_mux_init.c | 11 |
1 files changed, 1 insertions, 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; |