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
oldabi
Vitor Sessak 15 years ago
parent f10d3d343e
commit 8ad802e610
  1. 3
      libavfilter/defaults.c

@ -55,7 +55,8 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms,
pic->linesize[i] = FFALIGN(pic->linesize[i], 16); pic->linesize[i] = FFALIGN(pic->linesize[i], 16);
tempsize = ff_fill_pointer((AVPicture *)pic, NULL, pic->format, ref->h); 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); ff_fill_pointer((AVPicture *)pic, buf, pic->format, ref->h);
memcpy(ref->data, pic->data, sizeof(pic->data)); memcpy(ref->data, pic->data, sizeof(pic->data));

Loading…
Cancel
Save