diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-16 18:16:09 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-10-16 18:28:32 +0200 |
commit | 4fe4772a584a4b63c986ca18e0b25594b5061b66 (patch) | |
tree | 3d962a41c823062ef759cadee459cc5fd93f9327 /libavfilter/vf_colorchannelmixer.c | |
parent | 932913f0b406814d9c374c5e1a5ab6aa45a53168 (diff) |
avfilter/vf_colorchannelmixer: do not use pointer if there is no alpha
Fixes #8288
Diffstat (limited to 'libavfilter/vf_colorchannelmixer.c')
-rw-r--r-- | libavfilter/vf_colorchannelmixer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_colorchannelmixer.c b/libavfilter/vf_colorchannelmixer.c index e6c6fe3c5d..3bbe44d6ef 100644 --- a/libavfilter/vf_colorchannelmixer.c +++ b/libavfilter/vf_colorchannelmixer.c @@ -125,7 +125,7 @@ static av_always_inline int filter_slice_rgba_planar(AVFilterContext *ctx, void const uint8_t rin = srcr[j]; const uint8_t gin = srcg[j]; const uint8_t bin = srcb[j]; - const uint8_t ain = srca[j]; + const uint8_t ain = have_alpha ? srca[j] : 0; dstr[j] = av_clip_uint8(s->lut[R][R][rin] + s->lut[R][G][gin] + @@ -184,7 +184,7 @@ static av_always_inline int filter_slice_rgba16_planar(AVFilterContext *ctx, voi const uint16_t rin = srcr[j]; const uint16_t gin = srcg[j]; const uint16_t bin = srcb[j]; - const uint16_t ain = srca[j]; + const uint16_t ain = have_alpha ? srca[j] : 0; dstr[j] = av_clip_uintp2(s->lut[R][R][rin] + s->lut[R][G][gin] + |