diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-06-08 16:19:14 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-07-11 19:28:18 +0200 |
commit | c9a99ffe5120e300638e1d2f6634221e17fa5234 (patch) | |
tree | d241ac6e7979ff2963fca79bd0e0b4856ca6f009 /fftools/ffmpeg_filter.c | |
parent | fcc33ada47e594d6b35b71c4a998af796f56492e (diff) | |
download | ffmpeg-c9a99ffe5120e300638e1d2f6634221e17fa5234.tar.gz |
fftools/ffmpeg_filter: make sure no input or output is bound twice
Diffstat (limited to 'fftools/ffmpeg_filter.c')
-rw-r--r-- | fftools/ffmpeg_filter.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 60e09866af..432e2fced9 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -595,6 +595,8 @@ static int ifilter_bind_ist(InputFilter *ifilter, InputStream *ist) InputFilterPriv *ifp = ifp_from_ifilter(ifilter); int ret; + av_assert0(!ifp->ist); + ifp->ist = ist; ifp->type_src = ist->st->codecpar->codec_type; @@ -654,6 +656,8 @@ void ofilter_bind_ost(OutputFilter *ofilter, OutputStream *ost) FilterGraph *fg = ofilter->graph; const AVCodec *c = ost->enc_ctx->codec; + av_assert0(!ofilter->ost); + ofilter->ost = ost; av_freep(&ofilter->linklabel); |