That is a more appropriate place for it.
Unified · Split
| @@ -896,7 +896,7 @@ static int new_stream_subtitle(Muxer *mux, const OptionsContext *o, · 895 unmodified lines | ||
| 896 | 896 | |
| 897 | 897 | static int |
| 898 | 898 | ost_bind_filter(const Muxer *mux, MuxStream *ms, OutputFilter *ofilter, |
| 899 | − const OptionsContext *o, char *filters, | |
| 899 | + const OptionsContext *o, | |
| 900 | 900 | AVRational enc_tb, enum VideoSyncMethod vsync_method, |
| 901 | 901 | int keep_pix_fmt, int autoscale, int threads_manual, |
| 902 | 902 | const ViewSpecifier *vs) |
| @@ -904,6 +904,7 @@ ost_bind_filter(const Muxer *mux, MuxStream *ms, OutputFilter *ofilter, · 1 unmodified line | ||
| 904 | 904 | OutputStream *ost = &ms->ost; |
| 905 | 905 | AVCodecContext *enc_ctx = ost->enc->enc_ctx; |
| 906 | 906 | char name[16]; |
| 907 | + char *filters = NULL; | |
| 907 | 908 | int ret; |
| 908 | 909 | |
| 909 | 910 | OutputFilterOptions opts = { |
| @@ -985,7 +986,12 @@ ost_bind_filter(const Muxer *mux, MuxStream *ms, OutputFilter *ofilter, · 75 unmodified lines | ||
| 985 | 986 | return ret; |
| 986 | 987 | } |
| 987 | 988 | |
| 989 | + ret = ost_get_filters(o, mux->fc, ost, &filters); | |
| 990 | + if (ret < 0) | |
| 991 | + return ret; | |
| 992 | + | |
| 988 | 993 | if (ofilter) { |
| 994 | + av_assert0(!filters); | |
| 989 | 995 | ost->filter = ofilter; |
| 990 | 996 | ret = ofilter_bind_enc(ofilter, ms->sch_idx_enc, &opts); |
| 991 | 997 | } else { |
| @@ -1188,7 +1194,7 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type, · 196 unmodified lines | ||
| 1188 | 1194 | AVRational enc_tb = { 0, 0 }; |
| 1189 | 1195 | enum VideoSyncMethod vsync_method = VSYNC_AUTO; |
| 1190 | 1196 | const char *bsfs = NULL, *time_base = NULL, *codec_tag = NULL; |
| 1191 | − char *filters = NULL, *next; | |
| 1197 | + char *next; | |
| 1192 | 1198 | double qscale = -1; |
| 1193 | 1199 | |
| 1194 | 1200 | st = avformat_new_stream(oc, NULL); |
| @@ -1526,15 +1532,9 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type, · 331 unmodified lines | ||
| 1526 | 1532 | if (ret < 0) |
| 1527 | 1533 | goto fail; |
| 1528 | 1534 | |
| 1529 | − if (type == AVMEDIA_TYPE_VIDEO || type == AVMEDIA_TYPE_AUDIO) { | |
| 1530 | − ret = ost_get_filters(o, oc, ost, &filters); | |
| 1531 | − if (ret < 0) | |
| 1532 | − goto fail; | |
| 1533 | − } | |
| 1534 | − | |
| 1535 | 1535 | if (ost->enc && |
| 1536 | 1536 | (type == AVMEDIA_TYPE_VIDEO || type == AVMEDIA_TYPE_AUDIO)) { |
| 1537 | − ret = ost_bind_filter(mux, ms, ofilter, o, filters, enc_tb, vsync_method, | |
| 1537 | + ret = ost_bind_filter(mux, ms, ofilter, o, enc_tb, vsync_method, | |
| 1538 | 1538 | keep_pix_fmt, autoscale, threads_manual, vs); |
| 1539 | 1539 | if (ret < 0) |
| 1540 | 1540 | goto fail; |