aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2015-02-25 15:07:18 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2015-05-17 12:50:17 +0200
commit819889e7376442a70b3f85dba90bae5222b27c10 (patch)
treedf4505b3e60e9deee66ef540384151e046fd80ab
parent68f89b8264d46d5812e710ca0f903d4d323ec899 (diff)
downloadffmpeg-819889e7376442a70b3f85dba90bae5222b27c10.tar.gz
lavfi/fade: Do not overread input buffer.
(cherry picked from commit ab3ff19f08b7a83e320c39ab066f289c242b8030)
-rw-r--r--libavfilter/vf_fade.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index 1473273a97..e482fa7550 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -125,7 +125,9 @@ static int config_props(AVFilterLink *inlink)
s->hsub = pixdesc->log2_chroma_w;
s->vsub = pixdesc->log2_chroma_h;
- s->bpp = av_get_bits_per_pixel(pixdesc) >> 3;
+ s->bpp = pixdesc->flags & AV_PIX_FMT_FLAG_PLANAR ?
+ 1 :
+ av_get_bits_per_pixel(pixdesc) >> 3;
s->alpha &= !!(pixdesc->flags & AV_PIX_FMT_FLAG_ALPHA);
s->is_packed_rgb = ff_fill_rgba_map(s->rgba_map, inlink->format) >= 0;