summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-10-12 09:35:54 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-10-12 09:35:54 (GMT)
commit8c582d1b221346eb120fff0cf2214d4218ba4022 (patch)
treedb5844ee2a1521bd04a2b414a03dec97ed5e3010
parent8c0687abdf64fb2ef3ab2995ad88a3e9df4a2d90 (diff)
downloadffmpeg-8c582d1b221346eb120fff0cf2214d4218ba4022.zip
ffmpeg-8c582d1b221346eb120fff0cf2214d4218ba4022.tar.gz
ffmpeg-8c582d1b221346eb120fff0cf2214d4218ba4022.tar.bz2
avfilter/vf_removelogo: fix offset for accessing pixels above and below
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libavfilter/vf_removelogo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_removelogo.c b/libavfilter/vf_removelogo.c
index ea04ce0..d132e30 100644
--- a/libavfilter/vf_removelogo.c
+++ b/libavfilter/vf_removelogo.c
@@ -174,8 +174,8 @@ static void convert_mask_to_strength_mask(uint8_t *data, int linesize,
if ( *current_pixel >= current_pass &&
*(current_pixel + 1) >= current_pass &&
*(current_pixel - 1) >= current_pass &&
- *(current_pixel + w) >= current_pass &&
- *(current_pixel - w) >= current_pass) {
+ *(current_pixel + linesize) >= current_pass &&
+ *(current_pixel - linesize) >= current_pass) {
/* Increment the value since it still has not been
* eroded, as evidenced by the if statement that
* just evaluated to true. */