Browse code

Fix the size of the data to be copied from an AVFilterBuffer to an AVFilterBuffereRef in avfilter_default_get_video_buffer().

The error was being caused by the previous patch which resized
AVFilterBuffer's data and linesize arrays to 8.

Patch by S.N. Hemanth Meenakshisundaram" &smeenaks&ucsd&edu&.

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

S.N. Hemanth Meenakshisundaram authored on 2010/08/07 09:02:21
Showing 1 changed files
... ...
@@ -59,8 +59,8 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms,
59 59
                                     // SIMD-friendly
60 60
     av_fill_image_pointers(pic->data, pic->format, ref->h, buf, pic->linesize);
61 61
 
62
-    memcpy(ref->data,     pic->data,     sizeof(pic->data));
63
-    memcpy(ref->linesize, pic->linesize, sizeof(pic->linesize));
62
+    memcpy(ref->data,     pic->data,     4*sizeof(pic->data[0]));
63
+    memcpy(ref->linesize, pic->linesize, 4*sizeof(pic->linesize[0]));
64 64
 
65 65
     return ref;
66 66
 }