[FFmpeg-cvslog] fftools/ffmpeg_filter: make sure no input or output is bound twice

Anton Khirnov git at videolan.org
Tue Jul 11 20:29:01 EEST 2023


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Jun  8 16:19:14 2023 +0200| [c9a99ffe5120e300638e1d2f6634221e17fa5234] | committer: Anton Khirnov

fftools/ffmpeg_filter: make sure no input or output is bound twice

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c9a99ffe5120e300638e1d2f6634221e17fa5234
---

 fftools/ffmpeg_filter.c | 4 ++++
 1 file changed, 4 insertions(+)

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);
 



More information about the ffmpeg-cvslog mailing list