diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-09-12 18:25:36 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-09-26 18:29:40 +0200 |
commit | 72cd0c20da3a829f46d9649719d15b0be83da4b5 (patch) | |
tree | acc3c63c8a5b101741792831dc7f3f46f91c0e19 | |
parent | addc29f67ae5b23c385c0ce2434f298720454496 (diff) | |
download | ffmpeg-72cd0c20da3a829f46d9649719d15b0be83da4b5.tar.gz |
fftools/ffmpeg_filter: drop the OutputStream parameter to ofilter_bind_ost()
It is no longer used for anything besides a sanity-checking assert.
Rename the function to ofilter_bind_enc(), as it no longer has any
assumptions about the target being an output stream.
-rw-r--r-- | fftools/ffmpeg.h | 2 | ||||
-rw-r--r-- | fftools/ffmpeg_filter.c | 8 | ||||
-rw-r--r-- | fftools/ffmpeg_mux_init.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 29679432c6..d20034efb0 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -772,7 +772,7 @@ const FrameData *frame_data_c(AVFrame *frame); FrameData *packet_data (AVPacket *pkt); const FrameData *packet_data_c(AVPacket *pkt); -int ofilter_bind_ost(OutputFilter *ofilter, OutputStream *ost, +int ofilter_bind_enc(OutputFilter *ofilter, unsigned sched_idx_enc, const OutputFilterOptions *opts); diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 4c08386b8d..f785252be6 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -783,8 +783,7 @@ static int set_channel_layout(OutputFilterPriv *f, const AVChannelLayout *layout return 0; } -int ofilter_bind_ost(OutputFilter *ofilter, OutputStream *ost, - unsigned sched_idx_enc, +int ofilter_bind_enc(OutputFilter *ofilter, unsigned sched_idx_enc, const OutputFilterOptions *opts) { OutputFilterPriv *ofp = ofp_from_ofilter(ofilter); @@ -793,7 +792,8 @@ int ofilter_bind_ost(OutputFilter *ofilter, OutputStream *ost, int ret; av_assert0(!ofilter->bound); - av_assert0(ofilter->type == ost->type); + av_assert0(!opts->enc || + ofilter->type == opts->enc->type); ofilter->bound = 1; av_freep(&ofilter->linklabel); @@ -1222,7 +1222,7 @@ int init_simple_filtergraph(InputStream *ist, OutputStream *ost, if (ret < 0) return ret; - ret = ofilter_bind_ost(fg->outputs[0], ost, sched_idx_enc, opts); + ret = ofilter_bind_enc(fg->outputs[0], sched_idx_enc, opts); if (ret < 0) return ret; diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 1435d8339d..53a17c33a6 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@ -1008,7 +1008,7 @@ ost_bind_filter(const Muxer *mux, MuxStream *ms, OutputFilter *ofilter, if (ofilter) { ost->filter = ofilter; - ret = ofilter_bind_ost(ofilter, ost, ms->sch_idx_enc, &opts); + ret = ofilter_bind_enc(ofilter, ms->sch_idx_enc, &opts); } else { ret = init_simple_filtergraph(ost->ist, ost, filters, mux->sch, ms->sch_idx_enc, &opts); |