# HG changeset patch # User michael # Date 1026867271 0 # Node ID 5c6cc735c946ddf77415423d2762abe645f78d2d # Parent 93bce3460e2ad1ac152624a588eeab3b64ba3ff3 check if the available buffers are big enough in get_image diff -r 93bce3460e2a -r 5c6cc735c946 libvo/vo_xv.c --- a/libvo/vo_xv.c Tue Jul 16 23:42:44 2002 +0000 +++ b/libvo/vo_xv.c Wed Jul 17 00:54:31 2002 +0000 @@ -746,6 +746,9 @@ if(mpi->type==MP_IMGTYPE_IPB && num_buffers<3 && mpi->flags&MP_IMGFLAG_READABLE) return VO_FALSE; // not enough if(mpi->type==MP_IMGTYPE_IP && num_buffers<2 && mpi->flags&MP_IMGFLAG_READABLE) return VO_FALSE; // not enough if(mpi->imgfmt!=image_format || mpi->imgfmt==IMGFMT_BGR24) return VO_FALSE; // needs conversion :( + if( xvimage[current_buf]->pitches[0]*mpi->height + > xvimage[current_buf]->offsets[1] - xvimage[current_buf]->offsets[0]) return VO_FALSE; //buffer to small + if( xvimage[current_buf]->pitches[0] < mpi->width /*FIXME non yv12*/) return VO_FALSE; //buffer to small // if(mpi->flags&MP_IMGFLAG_READABLE) return VO_FALSE; // slow video ram if( (mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH)) || (mpi->width*(mpi->bpp/8)==xvimage[current_buf]->pitches[0]) ){