[FFmpeg-cvslog] fftools/ffmpeg: simplify init_output_filter()
Anton Khirnov
git at videolan.org
Mon Apr 24 18:03:20 EEST 2023
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Apr 18 14:56:46 2023 +0200| [4800b5025820c87d149fda260eb03bf6f66c430c] | committer: Anton Khirnov
fftools/ffmpeg: simplify init_output_filter()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4800b5025820c87d149fda260eb03bf6f66c430c
---
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;
More information about the ffmpeg-cvslog
mailing list