summaryrefslogtreecommitdiff
path: root/libavfilter/formats.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r--libavfilter/formats.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index b77ca8a069..c626b38c68 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -56,8 +56,10 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
b->format_count));
for (i = 0; i < a->format_count; i++)
for (j = 0; j < b->format_count; j++)
- if (a->formats[i] == b->formats[j])
+ if (a->formats[i] == b->formats[j]){
ret->formats[k++] = a->formats[i];
+ break;
+ }
ret->format_count = k;
/* check that there was at least one common format */