|
|
@ -351,14 +351,14 @@ AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name) |
|
|
|
ret->input_count = pad_count(filter->inputs); |
|
|
|
ret->input_count = pad_count(filter->inputs); |
|
|
|
if (ret->input_count) { |
|
|
|
if (ret->input_count) { |
|
|
|
ret->input_pads = av_malloc(sizeof(AVFilterPad) * ret->input_count); |
|
|
|
ret->input_pads = av_malloc(sizeof(AVFilterPad) * ret->input_count); |
|
|
|
memcpy(ret->input_pads, filter->inputs, sizeof(AVFilterPad)*ret->input_count); |
|
|
|
memcpy(ret->input_pads, filter->inputs, sizeof(AVFilterPad) * ret->input_count); |
|
|
|
ret->inputs = av_mallocz(sizeof(AVFilterLink*) * ret->input_count); |
|
|
|
ret->inputs = av_mallocz(sizeof(AVFilterLink*) * ret->input_count); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ret->output_count = pad_count(filter->outputs); |
|
|
|
ret->output_count = pad_count(filter->outputs); |
|
|
|
if (ret->output_count) { |
|
|
|
if (ret->output_count) { |
|
|
|
ret->output_pads = av_malloc(sizeof(AVFilterPad) * ret->output_count); |
|
|
|
ret->output_pads = av_malloc(sizeof(AVFilterPad) * ret->output_count); |
|
|
|
memcpy(ret->output_pads, filter->outputs, sizeof(AVFilterPad)*ret->output_count); |
|
|
|
memcpy(ret->output_pads, filter->outputs, sizeof(AVFilterPad) * ret->output_count); |
|
|
|
ret->outputs = av_mallocz(sizeof(AVFilterLink*) * ret->output_count); |
|
|
|
ret->outputs = av_mallocz(sizeof(AVFilterLink*) * ret->output_count); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|