Commit 7e116385 authored by vitor's avatar vitor

Do not copy more data than needed

Commited in SoC by Vitor Sessak on 2008-02-15 21:11:35


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12061 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2492b4e7
......@@ -20,6 +20,7 @@
*/
#include "avfilter.h"
#include "imgconvert.h"
/** list of registered filters */
struct FilterList
......@@ -261,10 +262,13 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h)
}
for(i = 0; i < 4; i ++) {
int planew =
ff_get_plane_bytewidth(link->format, link->cur_pic->w, i);
if(!src[i]) continue;
for(j = 0; j < h >> (i==0 ? 0 : vsub); j ++) {
memcpy(dst[i], src[i], link->cur_pic->linesize[i]);
memcpy(dst[i], src[i], planew);
src[i] += link->srcpic ->linesize[i];
dst[i] += link->cur_pic->linesize[i];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment