1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

Force linesize to be a multiple of 16

Commited in SoC by Vitor Sessak on 2008-02-10 20:51:58

Originally committed as revision 12074 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Vitor Sessak 2008-02-15 22:00:09 +00:00
parent 459821c533
commit 4cf48782f8

View File

@ -46,7 +46,9 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms)
pic->refcount = 1;
pic->format = link->format;
pic->free = avfilter_default_free_video_buffer;
avpicture_alloc((AVPicture *)pic, pic->format, ref->w, ref->h);
avpicture_alloc((AVPicture *)pic, pic->format,
(ref->w + 15) & (~15), // make linesize a multiple of 16
(ref->h + 15) & (~15));
memcpy(ref->data, pic->data, sizeof(pic->data));
memcpy(ref->linesize, pic->linesize, sizeof(pic->linesize));