Revision 4055438b libavfilter/vsrc_buffer.c

View differences:

libavfilter/vsrc_buffer.c
35 35
    AVRational        pixel_aspect;
36 36
} BufferSourceContext;
37 37

  
38

  
39 38
int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame,
40 39
                             int64_t pts, AVRational pixel_aspect)
41 40
{
......
64 63
{
65 64
    BufferSourceContext *c = ctx->priv;
66 65

  
67
    if(args && sscanf(args, "%d:%d:%d", &c->w, &c->h, &c->pix_fmt) == 3)
66
    if (args && sscanf(args, "%d:%d:%d", &c->w, &c->h, &c->pix_fmt) == 3)
68 67
        return 0;
69 68

  
70 69
    av_log(ctx, AV_LOG_ERROR, "init() expected 3 arguments:'%s'\n", args);
......
90 89
    return 0;
91 90
}
92 91

  
93

  
94 92
static int request_frame(AVFilterLink *link)
95 93
{
96 94
    BufferSourceContext *c = link->src->priv;
......
111 109
    av_picture_copy((AVPicture *)&picref->data, (AVPicture *)&c->frame,
112 110
                    picref->pic->format, link->w, link->h);
113 111

  
114
    picref->pts = c->pts;
115
    picref->pixel_aspect = c->pixel_aspect;
112
    picref->pts             = c->pts;
113
    picref->pixel_aspect    = c->pixel_aspect;
116 114
    picref->interlaced      = c->frame.interlaced_frame;
117 115
    picref->top_field_first = c->frame.top_field_first;
118 116
    avfilter_start_frame(link, avfilter_ref_pic(picref, ~0));
......
131 129
    return !!(c->has_frame);
132 130
}
133 131

  
134
AVFilter avfilter_vsrc_buffer =
135
{
132
AVFilter avfilter_vsrc_buffer = {
136 133
    .name      = "buffer",
137 134
    .priv_size = sizeof(BufferSourceContext),
138 135
    .query_formats = query_formats,

Also available in: Unified diff