Even better way to pass size to memcpy.
authorVitor Sessak <vitor1001@gmail.com>
Fri, 15 Feb 2008 21:35:35 +0000 (21:35 +0000)
committerVitor Sessak <vitor1001@gmail.com>
Fri, 15 Feb 2008 21:35:35 +0000 (21:35 +0000)
Commited in SoC by Bobby Bingham on 2007-07-02 14:33:18

Originally committed as revision 11971 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavfilter/avfilter.c

index 1f4feeb..ba97e12 100644 (file)
@@ -55,8 +55,8 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms)
     pic->free = avfilter_default_free_video_buffer;
     avpicture_alloc((AVPicture *)pic, pic->format, ref->w, ref->h);
 
-    memcpy(ref->data, pic->data, sizeof(uint8_t *) * 4);
-    memcpy(ref->linesize, pic->linesize, sizeof(int) * 4);
+    memcpy(ref->data, pic->data, sizeof(pic->data));
+    memcpy(ref->linesize, pic->linesize, sizeof(pic->linesize));
 
     return ref;
 }