changeset 8595:64efd67fee9b

i hate asserts
author arpi
date Sat, 28 Dec 2002 12:14:57 +0000
parents 00326905484b
children 1897d9c0f8c2
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Sat Dec 28 12:04:58 2002 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Sat Dec 28 12:14:57 2002 +0000
@@ -411,10 +411,11 @@
     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 @@
         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