changeset 9274:737c44487ebc

10l, avoid getting num_of_buffers=0
author alex
date Tue, 04 Feb 2003 16:14:54 +0000
parents b5b87f777d76
children d29f03d5763c
files libvo/vo_dga.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_dga.c	Tue Feb 04 15:45:45 2003 +0000
+++ b/libvo/vo_dga.c	Tue Feb 04 16:14:54 2003 +0000
@@ -611,11 +611,13 @@
 	else
 		vo_dga_nr_video_buffers = 1;
 
+	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;
 	
-	if(MAX_NR_VIDEO_BUFFERS < vo_dga_nr_video_buffers)
-		vo_dga_nr_video_buffers = MAX_NR_VIDEO_BUFFERS;
-	
 	for(i = 0; i < vo_dga_nr_video_buffers; i++)
 	{
 		vo_dga_video_buffer[i].y = i * view_port_height;