lavfi/scale: allocate interlaced scalers only if needed.

Fix "Value 0.000000 for parameter 'srch' out of range"
error message when source or destination height is 1.

Note: since the av_opt_set_int() calls are not checked for
failure and the interlaced scalers are not actually used,
this error has no consequence apart from a frightening message
in the log.
pull/27/merge
Nicolas George 11 years ago
parent 630fc7dcfc
commit ebaf20e94b
  1. 2
      libavfilter/vf_scale.c

@ -287,6 +287,8 @@ static int config_props(AVFilterLink *outlink)
if ((ret = sws_init_context(*s, NULL, NULL)) < 0)
return ret;
if (!scale->interlaced)
break;
}
}

Loading…
Cancel
Save