Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMina Nagy Zaki <mnzaki@gmail.com>2011-06-08 20:24:25 +0400
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-10 15:04:47 +0400
commit79a0ec1af4817bb7b989803b9f460d1e4acaf7b7 (patch)
tree5d8befa764836cdb38d77670310f35108d1b6a04 /libavfilter
parent989184fea4854720caef35347992499ba8033195 (diff)
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.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/formats.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index ec7fca3817..58593fcce0 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -44,6 +44,8 @@ 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 */