diff options
author | Mina Nagy Zaki <[email protected]> | 2011-06-08 19:24:25 +0300 |
---|---|---|
committer | Reinhard Tartler <[email protected]> | 2013-01-04 07:43:21 +0100 |
commit | 10c244cc89e80e1e924d442ccf40935bd7162178 (patch) | |
tree | b9f2fdb7ecc4d9d6440c9599d403ddd82a3607c1 | |
parent | 99008ba3667a28af5efe0934aa20aa37df8dbd86 (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.
Signed-off-by: Anton Khirnov <[email protected]>
(cherry picked from commit 11b6a82412bcd372adf694a26d83b07d337e1325)
Conflicts:
libavfilter/formats.c
Signed-off-by: Reinhard Tartler <[email protected]>
-rw-r--r-- | libavfilter/formats.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 1b58b50e9f..79baed03dc 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -47,6 +47,9 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b) if (a == b) return a; + if (a == b) + return a; + ret = av_mallocz(sizeof(AVFilterFormats)); /* merge list of formats */ |