lavfi: add avfilter_copy_frame_props()

avfilter_copy_frame_props() avoids code duplication and increases
robustness.
This commit is contained in:
Stefano Sabatini
2011-05-01 14:47:05 +02:00
committed by Anton Khirnov
parent 8a4a5f6ff7
commit 1c9e340d35
5 changed files with 32 additions and 10 deletions

View File

@ -131,12 +131,9 @@ static int request_frame(AVFilterLink *link)
c->frame.data, c->frame.linesize,
picref->format, link->w, link->h);
avfilter_copy_frame_props(picref, &c->frame);
picref->pts = c->pts;
picref->video->pixel_aspect = c->pixel_aspect;
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);