lavu/tx: do not unconditionally free subcontexts if initialization fails
authorLynne <dev@lynne.ee>
Sat, 29 Jan 2022 00:02:37 +0000 (01:02 +0100)
committerLynne <dev@lynne.ee>
Sat, 29 Jan 2022 00:02:37 +0000 (01:02 +0100)
commit7e35e0224cb1e82bfefdedeff9db946a05363c83
tree3d3981371be541fcf44c4df7e3bc47ce6c786269
parent265731f201f1dde0dfe2448ad21d8256c17a33e2
lavu/tx: do not unconditionally free subcontexts if initialization fails

If a codelet initializes 2 subtransforms, and the second one fails,
the failure would free all subcontexts.
Instead, if there are subcontexts still left, don't free the array.
If all initializations fail, the init() function will return,
and reset_ctx() from the previous step will clean up all contained
subtransforms.
libavutil/tx.c