From 7fcc474e3bbaa0a392159a08436d418fdbdca59d Mon Sep 17 00:00:00 2001 From: arpi Date: Sat, 28 Dec 2002 12:14:57 +0000 Subject: i hate asserts git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8596 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_ffmpeg.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libmpcodecs/vd_ffmpeg.c') diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 39b5b767aa..c7324c9dc6 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -411,10 +411,11 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ pic->data[0]= mpi->planes[0]; pic->data[1]= mpi->planes[1]; pic->data[2]= mpi->planes[2]; - - assert(mpi->w >= ((width +align)&(~align))); - assert(mpi->h >= ((height+align)&(~align))); - assert(mpi->stride[0] >= mpi->w); + +#if 0 + assert(mpi->width >= ((width +align)&(~align))); + assert(mpi->height >= ((height+align)&(~align))); + assert(mpi->stride[0] >= mpi->width); if(mpi->imgfmt==IMGFMT_I420 || mpi->imgfmt==IMGFMT_YV12 || mpi->imgfmt==IMGFMT_IYUV){ 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); @@ -426,6 +427,7 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ assert(mpi->planes[2] > mpi->planes[0] || mpi->planes[2] + c_size <= mpi->planes[0]); assert(mpi->planes[2] > mpi->planes[1] || mpi->planes[2] + c_size <= mpi->planes[1]); } +#endif /* Note, some (many) codecs in libavcodec must have stride1==stride2 && no changes between frames * lavc will check that and die with an error message, if its not true -- cgit v1.2.3