mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-11 17:55:21 +00:00
fftools/ffmpeg: simplify init_output_filter()
This commit is contained in:
parent
ea4c42779b
commit
4800b50258
@ -1245,16 +1245,7 @@ static OutputStream *ost_add(Muxer *mux, const OptionsContext *o,
|
|||||||
static void init_output_filter(OutputFilter *ofilter, const OptionsContext *o,
|
static void init_output_filter(OutputFilter *ofilter, const OptionsContext *o,
|
||||||
Muxer *mux)
|
Muxer *mux)
|
||||||
{
|
{
|
||||||
OutputStream *ost;
|
OutputStream *ost = ost_add(mux, o, ofilter->type, NULL);
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
ost->filter = ofilter;
|
ost->filter = ofilter;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user