Revision 90993b38 libavfilter/avfilter.c

View differences:

libavfilter/avfilter.c
350 350

  
351 351
    ret->input_count  = pad_count(filter->inputs);
352 352
    if (ret->input_count) {
353
    ret->input_pads   = av_malloc(sizeof(AVFilterPad) * ret->input_count);
354
    memcpy(ret->input_pads, filter->inputs, sizeof(AVFilterPad)*ret->input_count);
355
    ret->inputs       = av_mallocz(sizeof(AVFilterLink*) * ret->input_count);
353
        ret->input_pads   = av_malloc(sizeof(AVFilterPad) * ret->input_count);
354
        memcpy(ret->input_pads, filter->inputs, sizeof(AVFilterPad) * ret->input_count);
355
        ret->inputs       = av_mallocz(sizeof(AVFilterLink*) * ret->input_count);
356 356
    }
357 357

  
358 358
    ret->output_count = pad_count(filter->outputs);
359 359
    if (ret->output_count) {
360
    ret->output_pads  = av_malloc(sizeof(AVFilterPad) * ret->output_count);
361
    memcpy(ret->output_pads, filter->outputs, sizeof(AVFilterPad)*ret->output_count);
362
    ret->outputs      = av_mallocz(sizeof(AVFilterLink*) * ret->output_count);
360
        ret->output_pads  = av_malloc(sizeof(AVFilterPad) * ret->output_count);
361
        memcpy(ret->output_pads, filter->outputs, sizeof(AVFilterPad) * ret->output_count);
362
        ret->outputs      = av_mallocz(sizeof(AVFilterLink*) * ret->output_count);
363 363
    }
364 364

  
365 365
    return ret;

Also available in: Unified diff