Originally committed as revision 12045 to svn://svn.ffmpeg.org/ffmpeg/trunk
Showing the changes to libavfilter/avfilter.c (1 of 1 file). Show all
Unified · Split
| @@ -44,7 +44,7 @@ AVFilterPicRef *avfilter_ref_pic(AVFilterPicRef *ref, int pmask) · 43 unmodified lines | ||
| 44 | 44 | |
| 45 | 45 | void avfilter_unref_pic(AVFilterPicRef *ref) |
| 46 | 46 | { |
| 47 | − if(-- ref->pic->refcount == 0) | |
| 47 | + if(!(--ref->pic->refcount)) | |
| 48 | 48 | ref->pic->free(ref->pic); |
| 49 | 49 | av_free(ref); |
| 50 | 50 | } |
| @@ -126,9 +126,9 @@ int avfilter_config_links(AVFilterContext *filter) · 75 unmodified lines | ||
| 126 | 126 | unsigned i; |
| 127 | 127 | |
| 128 | 128 | for(i = 0; i < filter->input_count; i ++) { |
| 129 | − AVFilterLink *link; | |
| 129 | + AVFilterLink *link = filter->inputs[i]; | |
| 130 | 130 | |
| 131 | − if(!(link = filter->inputs[i])) continue; | |
| 131 | + if(!link) continue; | |
| 132 | 132 | |
| 133 | 133 | switch(link->init_state) { |
| 134 | 134 | case AVLINK_INIT: |
| @@ -410,10 +410,10 @@ void avfilter_destroy(AVFilterContext *filter) · 275 unmodified lines | ||
| 410 | 410 | |
| 411 | 411 | int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque) |
| 412 | 412 | { |
| 413 | − int ret; | |
| 413 | + int ret=0; | |
| 414 | 414 | |
| 415 | 415 | if(filter->filter->init) |
| 416 | − if((ret = filter->filter->init(filter, args, opaque))) return ret; | |
| 417 | − return 0; | |
| 416 | + ret = filter->filter->init(filter, args, opaque); | |
| 417 | + return ret; | |
| 418 | 418 | } |
| 419 | 419 | |