Mercurial > mplayer.hg
changeset 8586:88f2362f1291
5l - fixed asserts... mpi->width is allocated width, not the effective one
author | arpi |
---|---|
date | Sat, 28 Dec 2002 00:01:28 +0000 |
parents | 27da710563c2 |
children | 58e788758611 |
files | libmpcodecs/vd_ffmpeg.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c Fri Dec 27 22:43:20 2002 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sat Dec 28 00:01:28 2002 +0000 @@ -412,12 +412,12 @@ pic->data[1]= mpi->planes[1]; pic->data[2]= mpi->planes[2]; - assert(mpi->width >= ((width +align)&(~align))); - assert(mpi->height >= ((height+align)&(~align))); - assert(mpi->stride[0] >= mpi->width); + assert(mpi->w >= ((width +align)&(~align))); + assert(mpi->h >= ((height+align)&(~align))); + assert(mpi->stride[0] >= mpi->w); if(mpi->imgfmt==IMGFMT_I420 || mpi->imgfmt==IMGFMT_YV12 || mpi->imgfmt==IMGFMT_IYUV){ - const int y_size= mpi->stride[0] * mpi->height; - const int c_size= mpi->stride[1] * mpi->chroma_height; + const int y_size= mpi->stride[0] * (mpi->h-1) + mpi->w; + const int c_size= mpi->stride[1] * ((mpi->h>>1)-1) + (mpi->w>>1); assert(mpi->planes[0] > mpi->planes[1] || mpi->planes[0] + y_size <= mpi->planes[1]); assert(mpi->planes[0] > mpi->planes[2] || mpi->planes[0] + y_size <= mpi->planes[2]);