~ubuntu-branches/ubuntu/lucid/ffmpeg/lucid-updates

« back to all changes in this revision

Viewing changes to libavfilter/avfilter.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-01-20 17:51:19 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120175119-gu6kw1arv5tmf1vr
Tags: 3:0.svn20090119-1ubuntu1+unstripped1
* merge with the ubuntu.jaunty branch
* reenable x264 LP: #303537
* build against vdpau
* enable xvmc support

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
    link->dst     = dst;
91
91
    link->srcpad  = srcpad;
92
92
    link->dstpad  = dstpad;
93
 
    link->format  = -1;
 
93
    link->format  = PIX_FMT_NONE;
94
94
 
95
95
    return 0;
96
96
}
250
250
{
251
251
    uint8_t *src[4], *dst[4];
252
252
    int i, j, hsub, vsub;
 
253
    void (*draw_slice)(AVFilterLink *, int, int);
253
254
 
254
255
    /* copy the slice if needed for permission reasons */
255
256
    if(link->srcpic) {
279
280
        }
280
281
    }
281
282
 
282
 
    if(link_dpad(link).draw_slice)
283
 
        link_dpad(link).draw_slice(link, y, h);
 
283
    if(!(draw_slice = link_dpad(link).draw_slice))
 
284
        draw_slice = avfilter_default_draw_slice;
 
285
    draw_slice(link, y, h);
284
286
}
285
287
 
286
288
AVFilter *avfilter_get_by_name(const char *name)
339
341
    if (!filter)
340
342
        return 0;
341
343
 
342
 
    ret = av_malloc(sizeof(AVFilterContext));
 
344
    ret = av_mallocz(sizeof(AVFilterContext));
343
345
 
344
346
    ret->av_class = &avfilter_class;
345
347
    ret->filter   = filter;
347
349
    ret->priv     = av_mallocz(filter->priv_size);
348
350
 
349
351
    ret->input_count  = pad_count(filter->inputs);
350
 
    ret->input_pads   = av_malloc(sizeof(AVFilterPad) * ret->input_count);
351
 
    memcpy(ret->input_pads, filter->inputs, sizeof(AVFilterPad)*ret->input_count);
352
 
    ret->inputs       = av_mallocz(sizeof(AVFilterLink*) * ret->input_count);
 
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);
 
356
    }
353
357
 
354
358
    ret->output_count = pad_count(filter->outputs);
355
 
    ret->output_pads  = av_malloc(sizeof(AVFilterPad) * ret->output_count);
356
 
    memcpy(ret->output_pads, filter->outputs, sizeof(AVFilterPad)*ret->output_count);
357
 
    ret->outputs      = av_mallocz(sizeof(AVFilterLink*) * ret->output_count);
 
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);
 
363
    }
358
364
 
359
365
    return ret;
360
366
}