1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

Merge commit '4d1f31ea44f82adfb2b712534d71e27233a4f785'

* commit '4d1f31ea44f82adfb2b712534d71e27233a4f785':
  lavfi: make AVFilterContext export filter options.

Conflicts:
	libavfilter/avfilter.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-04-11 10:42:49 +02:00
commit 0965be00fe

View File

@ -456,28 +456,28 @@ static const char *default_filter_name(void *filter_ctx)
static void *filter_child_next(void *obj, void *prev) static void *filter_child_next(void *obj, void *prev)
{ {
AVFilterContext *ctx = obj; AVFilterContext *ctx = obj;
if (!prev && ctx->filter && ctx->filter->priv_class) if (!prev && ctx->filter && ctx->filter->priv_class && ctx->priv)
return ctx->priv; return ctx->priv;
return NULL; return NULL;
} }
static const AVClass *filter_child_class_next(const AVClass *prev) static const AVClass *filter_child_class_next(const AVClass *prev)
{ {
AVFilter **filter_ptr = NULL; AVFilter **f = NULL;
/* find the filter that corresponds to prev */ /* find the filter that corresponds to prev */
while (prev && *(filter_ptr = av_filter_next(filter_ptr))) while (prev && *(f = av_filter_next(f)))
if ((*filter_ptr)->priv_class == prev) if ((*f)->priv_class == prev)
break; break;
/* could not find filter corresponding to prev */ /* could not find filter corresponding to prev */
if (prev && !(*filter_ptr)) if (prev && !(*f))
return NULL; return NULL;
/* find next filter with specific options */ /* find next filter with specific options */
while (*(filter_ptr = av_filter_next(filter_ptr))) while (*(f = av_filter_next(f)))
if ((*filter_ptr)->priv_class) if ((*f)->priv_class)
return (*filter_ptr)->priv_class; return (*f)->priv_class;
return NULL; return NULL;
} }