mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
lavfi: add avfilter_copy_frame_props()
avfilter_copy_frame_props() avoids code duplication and increases robustness.
This commit is contained in:

committed by
Anton Khirnov

parent
8a4a5f6ff7
commit
1c9e340d35
@ -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);
|
||||
|
Reference in New Issue
Block a user