Still interested in thoughts on this patch/discussion. Thanks, Kevin
On Wed, Jun 7, 2017 at 3:54 AM, Kevin Mark <kmark...@gmail.com> wrote: > I also have to wonder if it would be advantageous to add the cast on > the right side as well. That way the var_values variables will have > the proper truncated values on future evaluations. Open to comments on > that. > > On Wed, Jun 7, 2017 at 3:45 AM, Kevin Mark <kmark...@gmail.com> wrote: >> - eval_w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res; >> + eval_w = var_values[VAR_OUT_W] = var_values[VAR_OW] = (int) res == 0 ? >> inlink->w : res; > > to perhaps: > + eval_w = var_values[VAR_OUT_W] = var_values[VAR_OW] = (int) res > == 0 ? inlink->w : (int) res; > > Without that extra cast I assume the values in eval_w and > var_values[VAR_OUT_W], var_values[VAR_OW] could be different. I doubt > most users expect that those values could ever be non-integers which > has implications for how you're writing your expression. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel