Alloc 16 extra bytes in libavfilter frames. Needed for MMX-optimized swscale.

Fix issue 1924.

Originally committed as revision 23077 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Vitor Sessak 2010-05-10 00:28:18 +00:00
parent f10d3d343e
commit 8ad802e610
1 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,8 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms,
pic->linesize[i] = FFALIGN(pic->linesize[i], 16);
tempsize = ff_fill_pointer((AVPicture *)pic, NULL, pic->format, ref->h);
buf = av_malloc(tempsize);
buf = av_malloc(tempsize + 16); // +2 is needed for swscaler, +16 to be
// SIMD-friendly
ff_fill_pointer((AVPicture *)pic, buf, pic->format, ref->h);
memcpy(ref->data, pic->data, sizeof(pic->data));