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

Clément Bœsch git at videolan.org
Tue May 7 15:39:21 CEST 2013


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Wed May  1 14:27:23 2013 +0200| [5043d8d213f18fbc010d2e2770d8642ebefb45df] | committer: Clément Bœsch

lavfi/alphaextract: copy width and not linesize.

Padding data is not supposed to be copied.

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

 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);
         }
     }
 



More information about the ffmpeg-cvslog mailing list