Revision a38cdfde libavfilter/vsrc_buffer.c

View differences:

libavfilter/vsrc_buffer.c
35 35
    enum PixelFormat  pix_fmt;
36 36
    AVRational        time_base;     ///< time_base to set in the output link
37 37
    AVRational        pixel_aspect;
38
    char              sws_param[256];
38 39
} BufferSourceContext;
39 40

  
40 41
int av_vsrc_buffer_add_frame2(AVFilterContext *buffer_filter, AVFrame *frame,
......
53 54
        //return -1;
54 55
    }
55 56

  
57
    if(!c->sws_param[0]){
58
        snprintf(c->sws_param, 255, "%d:%d:%s", c->w, c->h, sws_param);
59
    }
60

  
56 61
    if(width != c->w || height != c->h || pix_fmt != c->pix_fmt){
57 62
        AVFilterContext *scale= buffer_filter->outputs[0]->dst;
58 63
        AVFilterLink *link;
......
67 72
            if(avfilter_open(&scale, f, "Input equalizer") < 0)
68 73
                return -1;
69 74

  
70
            if((ret=avfilter_init_filter(scale, sws_param, NULL))<0){
75
            if((ret=avfilter_init_filter(scale, c->sws_param, NULL))<0){
71 76
                avfilter_free(scale);
72 77
                return ret;
73 78
            }

Also available in: Unified diff