AVFilterBufferRef *
avfilter_get_audio_buffer_ref_from_arrays(uint8_t *data[8], int linesize[8], int perms,
int nb_samples, enum AVSampleFormat sample_fmt,
- int64_t channel_layout, int planar)
+ uint64_t channel_layout, int planar)
{
AVFilterBuffer *samples = av_mallocz(sizeof(AVFilterBuffer));
AVFilterBufferRef *samplesref = av_mallocz(sizeof(AVFilterBufferRef));
filter_samples(link, link->cur_buf);
}
-#define MAX_REGISTERED_AVFILTERS_NB 64
+#define MAX_REGISTERED_AVFILTERS_NB 128
static AVFilter *registered_avfilters[MAX_REGISTERED_AVFILTERS_NB + 1];
int avfilter_register(AVFilter *filter)
{
- if (next_registered_avfilter_idx == MAX_REGISTERED_AVFILTERS_NB)
- return -1;
+ if (next_registered_avfilter_idx == MAX_REGISTERED_AVFILTERS_NB) {
+ av_log(NULL, AV_LOG_ERROR,
+ "Maximum number of registered filters %d reached, "
+ "impossible to register filter with name '%s'\n",
+ MAX_REGISTERED_AVFILTERS_NB, filter->name);
+ return AVERROR(ENOMEM);
+ }
registered_avfilters[next_registered_avfilter_idx++] = filter;
return 0;