[FFmpeg-devel] [PATCH] lavfi: avfilter_merge_formats: handle case where inputs are same.

Mina Nagy Zaki mnzaki at gmail.com
Thu Jun 9 10:10:09 CEST 2011


---
 libavfilter/formats.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index ec7fca3..58593fc 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 */
-- 
1.7.4.4


More information about the ffmpeg-devel mailing list