Showing the changes to libavfilter/vsrc_buffer.c (1 of 1 file). Show all
Unified · Split
| @@ -52,12 +52,12 @@ int av_vsrc_buffer_add_video_buffer_ref2(AVFilterContext *buffer_filter, AVFilte · 51 unmodified lines | ||
| 52 | 52 | //return -1; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | − if(!c->sws_param[0]){ | |
| 55 | + if (!c->sws_param[0]) { | |
| 56 | 56 | snprintf(c->sws_param, 255, "%d:%d:%s", c->w, c->h, sws_param); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | if (picref->video->w != c->w || picref->video->h != c->h || picref->format != c->pix_fmt) { |
| 60 | − AVFilterContext *scale= buffer_filter->outputs[0]->dst; | |
| 60 | + AVFilterContext *scale = buffer_filter->outputs[0]->dst; | |
| 61 | 61 | AVFilterLink *link; |
| 62 | 62 | |
| 63 | 63 | av_log(buffer_filter, AV_LOG_INFO, |
| @@ -65,26 +65,26 @@ int av_vsrc_buffer_add_video_buffer_ref2(AVFilterContext *buffer_filter, AVFilte · 1 unmodified line | ||
| 65 | 65 | c->w, c->h, av_pix_fmt_descriptors[c->pix_fmt].name, |
| 66 | 66 | picref->video->w, picref->video->h, av_pix_fmt_descriptors[picref->format].name); |
| 67 | 67 | |
| 68 | − if(!scale || strcmp(scale->filter->name,"scale")){ | |
| 69 | − AVFilter *f= avfilter_get_by_name("scale"); | |
| 68 | + if (!scale || strcmp(scale->filter->name, "scale")) { | |
| 69 | + AVFilter *f = avfilter_get_by_name("scale"); | |
| 70 | 70 | |
| 71 | 71 | av_log(buffer_filter, AV_LOG_INFO, "Inserting scaler filter\n"); |
| 72 | − if(avfilter_open(&scale, f, "Input equalizer") < 0) | |
| 72 | + if (avfilter_open(&scale, f, "Input equalizer") < 0) | |
| 73 | 73 | return -1; |
| 74 | 74 | |
| 75 | − if((ret=avfilter_init_filter(scale, c->sws_param, NULL))<0){ | |
| 75 | + if ((ret = avfilter_init_filter(scale, c->sws_param, NULL)) < 0) { | |
| 76 | 76 | avfilter_free(scale); |
| 77 | 77 | return ret; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | − if((ret=avfilter_insert_filter(buffer_filter->outputs[0], scale, 0, 0))<0){ | |
| 80 | + if ((ret = avfilter_insert_filter(buffer_filter->outputs[0], scale, 0, 0)) < 0) { | |
| 81 | 81 | avfilter_free(scale); |
| 82 | 82 | return ret; |
| 83 | 83 | } |
| 84 | 84 | scale->outputs[0]->time_base = scale->inputs[0]->time_base; |
| 85 | 85 | |
| 86 | 86 | scale->outputs[0]->format= c->pix_fmt; |
| 87 | − } else if(!strcmp(scale->filter->name, "scale")) { | |
| 87 | + } else if (!strcmp(scale->filter->name, "scale")) { | |
| 88 | 88 | snprintf(c->sws_param, 255, "%d:%d:%s", scale->outputs[0]->w, scale->outputs[0]->h, sws_param); |
| 89 | 89 | scale->filter->init(scale, c->sws_param, NULL); |
| 90 | 90 | } |
| @@ -93,7 +93,7 @@ int av_vsrc_buffer_add_video_buffer_ref2(AVFilterContext *buffer_filter, AVFilte · 2 unmodified lines | ||
| 93 | 93 | c->w = scale->inputs[0]->w = picref->video->w; |
| 94 | 94 | c->h = scale->inputs[0]->h = picref->video->h; |
| 95 | 95 | |
| 96 | − link= scale->outputs[0]; | |
| 96 | + link = scale->outputs[0]; | |
| 97 | 97 | if ((ret = link->srcpad->config_props(link)) < 0) |
| 98 | 98 | return ret; |
| 99 | 99 | } |