link->srcpad = &src->output_pads[srcpad];
link->dstpad = &dst->input_pads[dstpad];
link->type = src->output_pads[srcpad].type;
- av_assert0(PIX_FMT_NONE == -1 && AV_SAMPLE_FMT_NONE == -1);
+ av_assert0(AV_PIX_FMT_NONE == -1 && AV_SAMPLE_FMT_NONE == -1);
link->format = -1;
return 0;
link->sample_rate = inlink->sample_rate;
if (!link->time_base.num && !link->time_base.den)
link->time_base = inlink->time_base;
+ if (!link->channel_layout)
+ link->channel_layout = inlink->channel_layout;
} else if (!link->sample_rate) {
av_log(link->src, AV_LOG_ERROR,
"Audio source filters must set their output link's "
ff_tlog(ctx,
"link[%p s:%dx%d fmt:%s %s->%s]%s",
link, link->w, link->h,
- av_pix_fmt_descriptors[link->format].name,
+ av_get_pix_fmt_name(link->format),
link->src ? link->src->filter->name : "",
link->dst ? link->dst->filter->name : "",
end ? "\n" : "");
{
int count;
+ if (!pads)
+ return 0;
+
for(count = 0; pads->name; count ++) pads ++;
return count;
}