[FFmpeg-cvslog] avfilter/vf_decimate: fix crash with gray8

Paul B Mahol git at videolan.org
Thu Sep 19 19:53:37 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Sep 19 17:50:18 2013 +0000| [0ad5ef674b65fe87bb948e1c200f0c320db2f869] | committer: Paul B Mahol

avfilter/vf_decimate: fix crash with gray8

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ad5ef674b65fe87bb948e1c200f0c320db2f869
---

 libavfilter/vf_decimate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c
index 8767d5f..36284a0 100644
--- a/libavfilter/vf_decimate.c
+++ b/libavfilter/vf_decimate.c
@@ -86,7 +86,7 @@ static void calc_diffs(const DecimateContext *dm, struct qitem *q,
 
     memset(bdiffs, 0, dm->bdiffsize * sizeof(*bdiffs));
 
-    for (plane = 0; plane < (dm->chroma ? 3 : 1); plane++) {
+    for (plane = 0; plane < (dm->chroma && f1->data[2] ? 3 : 1); plane++) {
         int x, y, xl;
         const int linesize1 = f1->linesize[plane];
         const int linesize2 = f2->linesize[plane];



More information about the ffmpeg-cvslog mailing list