git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
828bd08
)
lavfi: avfilter_merge_formats: handle case where inputs are same
author
Mina Nagy Zaki
<mnzaki@gmail.com>
Wed, 8 Jun 2011 16:24:25 +0000
(19:24 +0300)
committer
Anton Khirnov
<anton@khirnov.net>
Mon, 7 May 2012 05:08:59 +0000
(07:08 +0200)
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 <anton@khirnov.net>
libavfilter/formats.c
patch
|
blob
|
history
diff --git
a/libavfilter/formats.c
b/libavfilter/formats.c
index
9d048d7
..
206eff5
100644
(file)
--- a/
libavfilter/formats.c
+++ b/
libavfilter/formats.c
@@
-45,6
+45,9
@@
AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
AVFilterFormats *ret;
unsigned i, j, k = 0, m_count;
+ if (a == b)
+ return a;
+
ret = av_mallocz(sizeof(*ret));
/* merge list of formats */