width and height are per-frame properties, setting these values in AVFrame simplify the operation of extraction of that information, since avoids the need to check the codec/stream context.
Showing the changes to libavfilter/vsrc_buffer.c (1 of 5 files). Show all
Unified · Split
| @@ -102,6 +102,8 @@ int av_vsrc_buffer_add_frame2(AVFilterContext *buffer_filter, AVFrame *frame, · 101 unmodified lines | ||
| 102 | 102 | |
| 103 | 103 | memcpy(c->frame.data , frame->data , sizeof(frame->data)); |
| 104 | 104 | memcpy(c->frame.linesize, frame->linesize, sizeof(frame->linesize)); |
| 105 | + c->frame.width = frame->width; | |
| 106 | + c->frame.height = frame->height; | |
| 105 | 107 | c->frame.interlaced_frame= frame->interlaced_frame; |
| 106 | 108 | c->frame.top_field_first = frame->top_field_first; |
| 107 | 109 | c->frame.key_frame = frame->key_frame; |