mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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.
This commit is contained in:
parent
265731f201
commit
7e35e0224c
@ -606,7 +606,8 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
|
||||
break;
|
||||
}
|
||||
|
||||
av_freep(&s->sub);
|
||||
if (!s->nb_sub)
|
||||
av_freep(&s->sub);
|
||||
|
||||
end:
|
||||
av_free(cd_matches);
|
||||
|
Loading…
Reference in New Issue
Block a user