fftools/ffmpeg_filter: make sure no input or output is bound twice
This commit is contained in:
parent
fcc33ada47
commit
c9a99ffe51
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user