[FFmpeg-devel] [PATCH] avfilter: Fix handling duplicate classes
Michael Niedermayer
michaelni at gmx.at
Sun Apr 14 21:47:47 CEST 2013
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavfilter/avfilter.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index f392613..35250f1 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -477,8 +477,13 @@ static const AVClass *filter_child_class_next(const AVClass *prev)
/* find next filter with specific options */
while ((f = avfilter_next(f)))
- if (f->priv_class)
- return f->priv_class;
+ if (f->priv_class) {
+ AVFilter *f2 = NULL;
+ while ((f2 = avfilter_next(f2)) && f->priv_class!=f2->priv_class)
+ ;
+ if(f==f2)
+ return f->priv_class;
+ }
return NULL;
}
--
1.7.9.5
More information about the ffmpeg-devel
mailing list