[FFmpeg-devel] [PATCH] lavfi/alphaextract: copy width and not linesize.

Clément Bœsch ubitux at gmail.com
Wed May 1 14:30:10 CEST 2013


Padding data is not supposed to be copied.
---
 libavfilter/vf_alphaextract.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavfilter/vf_alphaextract.c b/libavfilter/vf_alphaextract.c
index 62ceecf..d19a0f7 100644
--- a/libavfilter/vf_alphaextract.c
+++ b/libavfilter/vf_alphaextract.c
@@ -86,12 +86,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *cur_buf)
             }
         }
     } else {
-        const int linesize = abs(FFMIN(out_buf->linesize[Y], cur_buf->linesize[A]));
         int y;
         for (y = 0; y < outlink->h; y++) {
             memcpy(out_buf->data[Y] + y * out_buf->linesize[Y],
                    cur_buf->data[A] + y * cur_buf->linesize[A],
-                   linesize);
+                   outlink->w);
         }
     }
 
-- 
1.8.2.2



More information about the ffmpeg-devel mailing list