diff options
author | Ewald Snel <esnel@users.sourceforge.net> | 2002-04-14 00:58:23 +0000 |
---|---|---|
committer | Ewald Snel <esnel@users.sourceforge.net> | 2002-04-14 00:58:23 +0000 |
commit | a1625b4e6663751bc3c0987b89f9b4173c974bf2 (patch) | |
tree | 15bbe241991128d2dafbb43af90191497144bf56 | |
parent | 90795ff24df22de32a17fb694e50db883844c7c1 (diff) | |
download | xine-lib-a1625b4e6663751bc3c0987b89f9b4173c974bf2.tar.gz xine-lib-a1625b4e6663751bc3c0987b89f9b4173c974bf2.tar.bz2 |
avoid critical problems in yuv2rgb caused by very small frame output size
CVS patchset: 1718
CVS date: 2002/04/14 00:58:23
-rw-r--r-- | src/video_out/video_out_xshm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index 85eb528f0..1e9f543e9 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xshm.c,v 1.71 2002/03/26 19:40:43 mshopf Exp $ + * $Id: video_out_xshm.c,v 1.72 2002/04/14 00:58:23 esnel Exp $ * * video_out_xshm.c, X11 shared memory extension interface for xine * @@ -551,6 +551,12 @@ static void xshm_compute_rgb_size (xshm_driver_t *this, xshm_frame_t *frame) { frame->output_height = (double) frame->ideal_height * y_factor ; } + /* avoid problems in yuv2rgb */ + if (frame->output_height < ((frame->height + 15) >> 4)) + frame->output_height = ((frame->height + 15) >> 4); + if (frame->output_width < 8) + frame->output_width = 8; + #ifdef LOG printf("video_out_xshm: frame source %d x %d => screen output %d x %d%s\n", frame->width, frame->height, |