diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index ce57bf7955..4c2c1cf224 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -1,5 +1,7 @@ -#define NUM_BUFFERS 1 +// Number of buffers _FOR_DOUBLEBUFFERING_MODE_ +// Use option -double to enable double buffering! (default: single buffer) +#define NUM_BUFFERS 2 /* * vo_xv.c, X11 Xv interface @@ -11,6 +13,8 @@ * Aaron Holtzman * * Xv image suuport by Gerd Knorr + * fullscreen support by Pontscho + * double buffering support by A'rpi */ #include @@ -65,6 +69,7 @@ static XvAdaptorInfo *ai; static XvImageFormatValues *fo; static int current_buf=0; +static int num_buffers=1; // default static XvImage* xvimage[NUM_BUFFERS]; #include @@ -113,6 +118,7 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t mFullscreen=flags&1; dwidth=d_width; dheight=d_height; + num_buffers=vo_doublebuffering?NUM_BUFFERS:1; if (!vo_init()) return -1; @@ -210,7 +216,7 @@ static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t { printf( "using Xvideo port %d for hw scaling\n",xv_port ); - for(current_buf=0;current_buf