[FFmpeg-devel] [PATCH] libavfilter/scale2ref: Add constants for the primary input

Kevin Mark kmark937 at gmail.com
Sat Jun 3 04:37:34 EEST 2017


On Fri, Jun 2, 2017 at 9:16 PM, James Almer <jamrial at gmail.com> wrote:
> This broke 820 tests with Valgrind. All of them seem to point to
>
> ==1253== Invalid read of size 8
> ==1253==    at 0x697ECA: ff_scale_eval_dimensions (scale.c:118)

scale.c:118:

const char scale2ref = outlink->src->inputs[1] == inlink;

I believe the issue must be that ff_scale_eval_dimensions blindly
assumes a second input exists. A potential fix may be:

const char scale2ref = outlink->src->nb_inputs == 2 &&
outlink->src->inputs[1] == inlink;

As long as I am correct in assuming that nb_inputs will equal the
number of input links. I'll have to reproduce the valgrind tests
myself and see if this fixes it. Thanks James!


More information about the ffmpeg-devel mailing list