[vlc-commits] commit: Made XCB xvideo independant of VOUT_MAX_PICTURES. (Laurent Aimar )
git at videolan.org
git at videolan.org
Sun May 23 22:44:57 CEST 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun May 23 22:36:34 2010 +0200| [3576b1fdf04ad87cdd2d80b82bcd4a4519aea8ec] | committer: Laurent Aimar
Made XCB xvideo independant of VOUT_MAX_PICTURES.
The maximum number of surfaces it will allow is now 128, but the actual value
used is configured by the core (around 20-30 when DR is used, a few otherwise).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3576b1fdf04ad87cdd2d80b82bcd4a4519aea8ec
---
modules/video_output/xcb/xvideo.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 0fe9b13..ecb58ba 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -71,7 +71,7 @@ vlc_module_begin ()
add_shortcut ("xvideo")
vlc_module_end ()
-#define MAX_PICTURES (VOUT_MAX_PICTURES)
+#define MAX_PICTURES (128)
struct vout_display_sys_t
{
@@ -586,7 +586,6 @@ static void Close (vlc_object_t *obj)
static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
{
vout_display_sys_t *p_sys = vd->sys;
- (void)requested_count;
if (!p_sys->pool)
{
@@ -600,8 +599,10 @@ static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count)
unsigned count;
picture_t *pic_array[MAX_PICTURES];
- for (count = 0; count < MAX_PICTURES; count++)
+ for (count = 0; count < requested_count; count++)
{
+ if (count >= MAX_PICTURES)
+ break;
picture_resource_t *res = &p_sys->resource[count];
for (int i = 0; i < __MIN (p_sys->att->num_planes, PICTURE_PLANE_MAX); i++)
More information about the vlc-commits
mailing list