diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-09-24 09:35:56 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-09-30 09:29:18 +0200 |
commit | f295b4d8a0a1726157b4404c9cdd9a03aa7f171d (patch) | |
tree | 49a2b3de17b06077acdb180ca6b1046aa251c612 /fftools/ffmpeg_mux_init.c | |
parent | 8e805b9c3cab76383cace0a83c6bb66192282b05 (diff) | |
download | ffmpeg-f295b4d8a0a1726157b4404c9cdd9a03aa7f171d.tar.gz |
fftools/ffmpeg_demux: drop ist_output_add()
It is now a trivial wrapper over ist_use(), so export that directly.
Diffstat (limited to 'fftools/ffmpeg_mux_init.c')
-rw-r--r-- | fftools/ffmpeg_mux_init.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index ec9f328e90..2541be59da 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -1537,18 +1537,19 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type, if (ret < 0) goto fail; } else if (ost->ist) { - int sched_idx = ist_output_add(ost->ist, ost); - if (sched_idx < 0) { + SchedulerNode src; + + ret = ist_use(ost->ist, !!ost->enc, NULL, &src); + if (ret < 0) { av_log(ost, AV_LOG_ERROR, "Error binding an input stream\n"); - ret = sched_idx; goto fail; } - ms->sch_idx_src = sched_idx; + ms->sch_idx_src = src.idx; if (ost->enc) { - ret = sch_connect(mux->sch, SCH_DEC_OUT(sched_idx, 0), - SCH_ENC(ms->sch_idx_enc)); + ret = sch_connect(mux->sch, + src, SCH_ENC(ms->sch_idx_enc)); if (ret < 0) goto fail; @@ -1557,8 +1558,8 @@ static int ost_add(Muxer *mux, const OptionsContext *o, enum AVMediaType type, if (ret < 0) goto fail; } else { - ret = sch_connect(mux->sch, SCH_DSTREAM(ost->ist->file->index, sched_idx), - SCH_MSTREAM(ost->file->index, ms->sch_idx)); + ret = sch_connect(mux->sch, + src, SCH_MSTREAM(ost->file->index, ms->sch_idx)); if (ret < 0) goto fail; } |