mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-14 02:50:11 +01:00
fftools/ffmpeg_filter: stop accessing AVCodecContext.codec
Instead pass the encoder through a newly-added output options struct, analogous to previously added input options. Will allow decoupling filtering from encoding in future commits.
This commit is contained in:
@@ -1371,14 +1371,18 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type,
|
||||
|
||||
if (ost->enc &&
|
||||
(type == AVMEDIA_TYPE_VIDEO || type == AVMEDIA_TYPE_AUDIO)) {
|
||||
OutputFilterOptions opts = {
|
||||
.enc = enc,
|
||||
};
|
||||
|
||||
if (ofilter) {
|
||||
ost->filter = ofilter;
|
||||
ret = ofilter_bind_ost(ofilter, ost, ms->sch_idx_enc);
|
||||
ret = ofilter_bind_ost(ofilter, ost, ms->sch_idx_enc, &opts);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
} else {
|
||||
ret = init_simple_filtergraph(ost->ist, ost, filters,
|
||||
mux->sch, ms->sch_idx_enc);
|
||||
mux->sch, ms->sch_idx_enc, &opts);
|
||||
if (ret < 0) {
|
||||
av_log(ost, AV_LOG_ERROR,
|
||||
"Error initializing a simple filtergraph\n");
|
||||
|
||||
Reference in New Issue
Block a user