]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/avfilter.c
Make avfilter_ref_pic also handle removal of permissions for the caller.
[ffmpeg] / libavfilter / avfilter.c
index 79c4cc07b762af3001ccb663737a70a23ef710ce..0182e47018621613f7bbfa988f97124cbf505ce1 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include "avfilter.h"
-#include "allfilters.h"
+#include "imgconvert.h"
 
 /** list of registered filters */
 struct FilterList
@@ -262,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];
             }