changeset 459:ce1a3e82328b libavformat

segfault fix
author michael
date Thu, 13 May 2004 14:54:57 +0000
parents 202dd4d0714f
children 6624afe8bf65
files img.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/img.c	Fri May 07 02:57:13 2004 +0000
+++ b/img.c	Thu May 13 14:54:57 2004 +0000
@@ -175,7 +175,7 @@
     st->codec.width = s->width;
     st->codec.height = s->height;
     st->codec.pix_fmt = s->pix_fmt;
-    s->img_size = avpicture_get_size(s->pix_fmt, s->width, s->height);
+    s->img_size = avpicture_get_size(s->pix_fmt, (s->width+15)&(~15), (s->height+15)&(~15));
 
     return 0;
  fail1:
@@ -193,7 +193,7 @@
     if (info->width != s->width ||
         info->height != s->height)
         return -1;
-    avpicture_fill(&info->pict, s->ptr, info->pix_fmt, info->width, info->height);
+    avpicture_fill(&info->pict, s->ptr, info->pix_fmt, (info->width+15)&(~15), (info->height+15)&(~15));
     return 0;
 }