lavfi: avfilter_merge_formats: handle case where inputs are same
This fixes a double-free crash if lists are the same due to the two merge_ref() calls at the end of the (useless) merging that happens.
This commit is contained in:
parent
989184fea4
commit
79a0ec1af4
@ -44,6 +44,8 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
|
|||||||
AVFilterFormats *ret;
|
AVFilterFormats *ret;
|
||||||
unsigned i, j, k = 0;
|
unsigned i, j, k = 0;
|
||||||
|
|
||||||
|
if (a == b) return a;
|
||||||
|
|
||||||
ret = av_mallocz(sizeof(AVFilterFormats));
|
ret = av_mallocz(sizeof(AVFilterFormats));
|
||||||
|
|
||||||
/* merge list of formats */
|
/* merge list of formats */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user