From a1625b4e6663751bc3c0987b89f9b4173c974bf2 Mon Sep 17 00:00:00 2001 From: Ewald Snel Date: Sun, 14 Apr 2002 00:58:23 +0000 Subject: avoid critical problems in yuv2rgb caused by very small frame output size CVS patchset: 1718 CVS date: 2002/04/14 00:58:23 --- src/video_out/video_out_xshm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3