avfiler/vf_mix: fix crash with >8 bit depth
authorPaul B Mahol <onemda@gmail.com>
Wed, 25 Apr 2018 12:08:21 +0000 (14:08 +0200)
committerPaul B Mahol <onemda@gmail.com>
Wed, 25 Apr 2018 12:08:21 +0000 (14:08 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/vf_mix.c

index 261ab06..a548f26 100644 (file)
@@ -151,7 +151,7 @@ static int process_frame(FFFrameSync *fs)
             uint16_t *dst = (uint16_t *)out->data[p];
 
             for (y = 0; y < s->height[p]; y++) {
             uint16_t *dst = (uint16_t *)out->data[p];
 
             for (y = 0; y < s->height[p]; y++) {
-                for (x = 0; x < s->linesize[p]; x++) {
+                for (x = 0; x < s->linesize[p] / 2; x++) {
                     int val = 0;
 
                     for (i = 0; i < s->nb_inputs; i++) {
                     int val = 0;
 
                     for (i = 0; i < s->nb_inputs; i++) {