This makes eventual warnings issued in case of swscale context creation failure to be shown after the conversion information rather than before, which is slightly less confusing. Originally committed as revision 23056 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -128,10 +128,6 @@ static int config_props(AVFilterLink *outlink) · 127 unmodified lines | ||
| 128 | 128 | outlink->h = h; |
| 129 | 129 | |
| 130 | 130 | /* TODO: make algorithm configurable */ |
| 131 | − scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format, | |
| 132 | − outlink->w, outlink->h, outlink->format, | |
| 133 | − scale->flags, NULL, NULL, NULL); | |
| 134 | − | |
| 135 | 131 | av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s -> w:%d h:%d fmt:%s flags:%0x\n", |
| 136 | 132 | inlink ->w, inlink ->h, av_pix_fmt_descriptors[ inlink->format].name, |
| 137 | 133 | outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name, |
| @@ -139,6 +135,10 @@ static int config_props(AVFilterLink *outlink) · 1 unmodified line | ||
| 139 | 135 | |
| 140 | 136 | scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL; |
| 141 | 137 | |
| 138 | + scale->sws = sws_getContext(inlink ->w, inlink ->h, inlink ->format, | |
| 139 | + outlink->w, outlink->h, outlink->format, | |
| 140 | + scale->flags, NULL, NULL, NULL); | |
| 141 | + | |
| 142 | 142 | return !scale->sws; |
| 143 | 143 | } |
| 144 | 144 | |