From cdb7ff9cd033eb0558caa74ab3a3d6e34537343e Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 4 Feb 2003 16:14:54 +0000 Subject: [PATCH] 10l, avoid getting num_of_buffers=0 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9275 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_dga.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libvo/vo_dga.c b/libvo/vo_dga.c index 9e63eed9c6..50f5b504b3 100644 --- a/libvo/vo_dga.c +++ b/libvo/vo_dga.c @@ -611,10 +611,12 @@ static void init_video_buffers(uint8_t *buffer_base, else vo_dga_nr_video_buffers = 1; - vo_dga_current_video_buffer = 0; - - if(MAX_NR_VIDEO_BUFFERS < vo_dga_nr_video_buffers) + if (vo_dga_nr_video_buffers > MAX_NR_VIDEO_BUFFERS) vo_dga_nr_video_buffers = MAX_NR_VIDEO_BUFFERS; + if (vo_dga_nr_video_buffers <= 0) + vo_dga_nr_video_buffers = 1; + + vo_dga_current_video_buffer = 0; for(i = 0; i < vo_dga_nr_video_buffers; i++) {