diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-02-15 22:00:09 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-02-15 22:00:09 +0000 |
commit | 4cf48782f817a9e5f0f2acbe0500eada475a295d (patch) | |
tree | 5e8e2fe3b8cd5d9768cab7a16c4cc2d7e6a78814 | |
parent | 459821c53386f8eddadedbfe0ec19e11bf406ed5 (diff) | |
download | ffmpeg-4cf48782f817a9e5f0f2acbe0500eada475a295d.tar.gz |
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
-rw-r--r-- | libavfilter/defaults.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c index b518d32d73..5cc60d539c 100644 --- a/libavfilter/defaults.c +++ b/libavfilter/defaults.c @@ -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)); |