summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-05-13 14:54:57 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-05-13 14:54:57 +0000
commit7f2ca68a8460b1e5ab0e53fa068296a779bd116c (patch)
tree349400870c56400a802bceeb62702a1cc7570fad
parentd2bfadc05ff7c13850cf62486eba9fcf23b0fb20 (diff)
segfault fix
Originally committed as revision 3135 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/img.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/img.c b/libavformat/img.c
index 25ac511960..3833841176 100644
--- a/libavformat/img.c
+++ b/libavformat/img.c
@@ -175,7 +175,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
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 @@ static int read_packet_alloc_cb(void *opaque, AVImageInfo *info)
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;
}