vf_unsharp: fix out-of-buffer read
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Fri, 12 Aug 2011 06:42:35 +0000 (08:42 +0200)
committerAnton Khirnov <anton@khirnov.net>
Thu, 29 Sep 2011 05:19:30 +0000 (07:19 +0200)
commit998e8519efbc772994c5ba19c0d39573998be9db
tree86fce78e47359085f0e28004155b92df58f9585f
parentdaf98908118074e96199ca7195663af4543d3808
vf_unsharp: fix out-of-buffer read

In apply_unsharp(), when y is >= height, prevent out-of-buffer reading
from src, read from the last buffer line in src2 instead.

The check was implemented in the original unsharp libmpcodecs code and
lost in the port.

This also fixes output discrepancy between the two filters.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavfilter/vf_unsharp.c