return formats;
}
-#if LIBAVFILTER_VERSION_MAJOR < 8
-AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts)
-{
- return ff_make_format64_list(fmts);
-}
-#endif
-
#define ADD_FORMAT(f, fmt, unref_fn, type, list, nb) \
do { \
type *fmts; \
#define FORMATS_REF(f, ref, unref_fn) \
void *tmp; \
\
- if (!f || !ref) \
+ if (!f) \
return AVERROR(ENOMEM); \
\
tmp = av_realloc_array(f->refs, sizeof(*f->refs), f->refcount + 1); \
do { \
int idx = -1; \
\
- if (!ref || !*ref) \
+ if (!*ref) \
return; \
\
FIND_REF_INDEX(ref, idx); \
int ff_default_query_formats(AVFilterContext *ctx)
{
int ret;
- enum AVMediaType type = ctx->inputs && ctx->inputs [0] ? ctx->inputs [0]->type :
- ctx->outputs && ctx->outputs[0] ? ctx->outputs[0]->type :
+ enum AVMediaType type = ctx->nb_inputs ? ctx->inputs [0]->type :
+ ctx->nb_outputs ? ctx->outputs[0]->type :
AVMEDIA_TYPE_VIDEO;
ret = ff_set_common_formats(ctx, ff_all_formats(type));