| Index: source/patched-ffmpeg-mt/libavfilter/avfilter.c | 
| =================================================================== | 
| --- source/patched-ffmpeg-mt/libavfilter/avfilter.c	(revision 65184) | 
| +++ source/patched-ffmpeg-mt/libavfilter/avfilter.c	(working copy) | 
| @@ -23,6 +23,7 @@ | 
|  | 
| #include "libavcodec/audioconvert.c" | 
| #include "libavutil/pixdesc.h" | 
| +#include "libavutil/rational.h" | 
| #include "libavcore/imgutils.h" | 
| #include "avfilter.h" | 
| #include "internal.h" | 
| @@ -156,6 +157,7 @@ | 
| { | 
| int (*config_link)(AVFilterLink *); | 
| unsigned i; | 
| +    int ret; | 
|  | 
| for (i = 0; i < filter->input_count; i ++) { | 
| AVFilterLink *link = filter->inputs[i]; | 
| @@ -171,17 +173,21 @@ | 
| case AVLINK_UNINIT: | 
| link->init_state = AVLINK_STARTINIT; | 
|  | 
| -            if (avfilter_config_links(link->src)) | 
| -                return -1; | 
| +            if ((ret = avfilter_config_links(link->src)) < 0) | 
| +                return ret; | 
|  | 
| if (!(config_link = link->srcpad->config_props)) | 
| config_link  = avfilter_default_config_output_link; | 
| -            if (config_link(link)) | 
| -                return -1; | 
| +            if ((ret = config_link(link)) < 0) | 
| +                return ret; | 
|  | 
| +            if (link->time_base.num == 0 && link->time_base.den == 0) | 
| +                link->time_base = link->src && link->src->input_count ? | 
| +                    link->src->inputs[0]->time_base : AV_TIME_BASE_Q; | 
| + | 
| if ((config_link = link->dstpad->config_props)) | 
| -                if (config_link(link)) | 
| -                    return -1; | 
| +                if ((ret = config_link(link)) < 0) | 
| +                    return ret; | 
|  | 
| link->init_state = AVLINK_INIT; | 
| } | 
|  |