From 566666caf3a09d6254edaa99d222eddb6fe2986b Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sun, 1 May 2011 14:47:05 +0200 Subject: lavfi: add libavfilter/avcodec.h and avfilter_copy_frame_props() avfilter_copy_frame_props() avoids code duplication and increases robustness. The added files libavfilter/avcodec.[ch] are used for containing utilities useful for gluing togheter libavfilter and libavcodec. --- libavfilter/vsrc_buffer.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libavfilter/vsrc_buffer.c') diff --git a/libavfilter/vsrc_buffer.c b/libavfilter/vsrc_buffer.c index b094e99209..b78d979711 100644 --- a/libavfilter/vsrc_buffer.c +++ b/libavfilter/vsrc_buffer.c @@ -24,6 +24,7 @@ */ #include "avfilter.h" +#include "avcodec.h" #include "vsrc_buffer.h" #include "libavutil/imgutils.h" @@ -193,13 +194,9 @@ static int request_frame(AVFilterLink *link) av_image_copy(picref->data, picref->linesize, c->frame.data, c->frame.linesize, picref->format, link->w, link->h); + avfilter_copy_frame_props(picref, &c->frame); + picref->pts = c->pts; - picref->pts = c->pts; - picref->video->sample_aspect_ratio = c->frame.sample_aspect_ratio; - picref->video->interlaced = c->frame.interlaced_frame; - picref->video->top_field_first = c->frame.top_field_first; - picref->video->key_frame = c->frame.key_frame; - picref->video->pict_type = c->frame.pict_type; avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0)); avfilter_draw_slice(link, 0, link->h, 1); avfilter_end_frame(link); -- cgit v1.2.3