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:
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;
}
} else {
/* XXX: computing this pts is not necessary as it is done in
the generic code too */
- pkt->pts = av_rescale((int64_t)s->img_count * s1->streams[0]->codec.frame_rate_base, s1->pts_den, s1->streams[0]->codec.frame_rate) / s1->pts_num;
+ pkt->pts = av_rescale((int64_t)s->img_count * s1->streams[0]->codec.frame_rate_base, s1->streams[0]->time_base.den, s1->streams[0]->codec.frame_rate) / s1->streams[0]->time_base.num;
s->img_count++;
s->img_number++;
return 0;