diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-04-17 00:21:17 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-04-17 00:24:16 +0000 |
commit | b8edf91657ad9fa2f0c5175c9ca8fbe3c8b0c624 (patch) | |
tree | 5facc4726afc888ffcf21c4e2c738e3f2294056e | |
parent | 161dee43213dafee0f7d969320fc4bc5318ba68d (diff) | |
download | ffmpeg-b8edf91657ad9fa2f0c5175c9ca8fbe3c8b0c624.tar.gz |
lavfi/histeq: fix out of array write
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavfilter/vf_histeq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_histeq.c b/libavfilter/vf_histeq.c index 7d68be7c36..33cddaadbe 100644 --- a/libavfilter/vf_histeq.c +++ b/libavfilter/vf_histeq.c @@ -235,7 +235,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic) dst[x + histeq->rgba_map[R]] = r; dst[x + histeq->rgba_map[G]] = g; dst[x + histeq->rgba_map[B]] = b; - oluma = (55 * r + 182 * g + 19 * b) >> 8; + oluma = av_clip_uint8((55 * r + 182 * g + 19 * b) >> 8); histeq->out_histogram[oluma]++; } } |