[Mplayer-cvslog] CVS: main/libmpcodecs vd_ffmpeg.c,1.79,1.80

Arpi of Ize arpi at mplayerhq.hu
Sat Dec 28 01:01:42 CET 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv3264

Modified Files:
	vd_ffmpeg.c 
Log Message:
5l - fixed asserts... mpi->width is allocated width, not the effective one


Index: vd_ffmpeg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_ffmpeg.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- vd_ffmpeg.c	21 Dec 2002 20:39:40 -0000	1.79
+++ vd_ffmpeg.c	28 Dec 2002 00:01:28 -0000	1.80
@@ -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]);




More information about the MPlayer-cvslog mailing list