The format is a per-frame property, having it in AVFrame simplify the operation of extraction of that information, since avoids the need to access the codec/stream context.
Showing the changes to libavfilter/vsrc_buffer.c (1 of 5 files). Show all
Unified · Split
| @@ -104,6 +104,7 @@ int av_vsrc_buffer_add_frame2(AVFilterContext *buffer_filter, AVFrame *frame, · 103 unmodified lines | ||
| 104 | 104 | memcpy(c->frame.linesize, frame->linesize, sizeof(frame->linesize)); |
| 105 | 105 | c->frame.width = frame->width; |
| 106 | 106 | c->frame.height = frame->height; |
| 107 | + c->frame.format = frame->format; | |
| 107 | 108 | c->frame.interlaced_frame= frame->interlaced_frame; |
| 108 | 109 | c->frame.top_field_first = frame->top_field_first; |
| 109 | 110 | c->frame.key_frame = frame->key_frame; |