Browse Source

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.
tags/n0.8
Mina Nagy Zaki Stefano Sabatini 14 years ago
parent
commit
79a0ec1af4
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavfilter/formats.c

+ 2
- 0
libavfilter/formats.c View File

@@ -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 */


Loading…
Cancel
Save