Author: vitor
Date: Fri Feb 15 22:11:35 2008
New Revision: 1915
Log:
Do not copy more data than needed
Modified:
libavfilter/avfilter.c
Modified: libavfilter/avfilter.c
==============================================================================
--- libavfilter/avfilter.c (original)
+++ libavfilter/avfilter.c Fri Feb 15 22:11:35 2008
@@ -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 *l
}
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];
}
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc