+
+int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *frame)
+{
+ int ret;
+ FF_TPRINTF_START(NULL, filter_frame); ff_tlog_link(NULL, link, 1); ff_tlog(NULL, " "); ff_tlog_ref(NULL, frame, 1);
+
+ switch (link->type) {
+ case AVMEDIA_TYPE_VIDEO:
+ if((ret = ff_start_frame(link, frame)) < 0)
+ return ret;
+ if((ret = ff_draw_slice(link, 0, frame->video->h, 1)) < 0)
+ return ret;
+ if((ret = ff_end_frame(link)) < 0)
+ return ret;
+ return ret;
+ case AVMEDIA_TYPE_AUDIO:
+ return ff_filter_samples(link, frame);
+ default: return AVERROR(EINVAL);
+ }
+}