Commit bf19ac47 authored by vitor's avatar vitor

Force linesize to be a multiple of 16

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12074 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b9b4bf92
...@@ -46,7 +46,9 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms) ...@@ -46,7 +46,9 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms)
pic->refcount = 1; pic->refcount = 1;
pic->format = link->format; pic->format = link->format;
pic->free = avfilter_default_free_video_buffer; 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->data, pic->data, sizeof(pic->data));
memcpy(ref->linesize, pic->linesize, sizeof(pic->linesize)); memcpy(ref->linesize, pic->linesize, sizeof(pic->linesize));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment