Module: libav Branch: release/0.7 Commit: b6c5848a1f8fc2755ea70d325acaddae9fac45ab
Author: Mina Nagy Zaki <[email protected]> Committer: Anton Khirnov <[email protected]> Date: Wed Jun 8 19:24:25 2011 +0300 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. Signed-off-by: Anton Khirnov <[email protected]> (cherry picked from commit 11b6a82412bcd372adf694a26d83b07d337e1325) Conflicts: libavfilter/formats.c Signed-off-by: Reinhard Tartler <[email protected]> (cherry picked from commit e5f4e249422834f727bcd432b73af971277f1371) Signed-off-by: Anton Khirnov <[email protected]> --- libavfilter/formats.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index ae916cf..1b58b50 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -44,6 +44,9 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b) AVFilterFormats *ret; unsigned i, j, k = 0; + if (a == b) + return a; + ret = av_mallocz(sizeof(AVFilterFormats)); /* merge list of formats */ _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
