[vlc-commits] android_window: don't add min_undequeued in the pool size

Thomas Guillem git at videolan.org
Fri Nov 21 11:13:07 CET 2014


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Nov 21 10:48:54 2014 +0100| [63db443224b1874768fbeb34ec04f49fb87597f1] | committer: Jean-Baptiste Kempf

android_window: don't add min_undequeued in the pool size

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=63db443224b1874768fbeb34ec04f49fb87597f1
---

 modules/video_output/android/android_window.c |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/modules/video_output/android/android_window.c b/modules/video_output/android/android_window.c
index 01285ad..cd24e7b 100644
--- a/modules/video_output/android/android_window.c
+++ b/modules/video_output/android/android_window.c
@@ -298,13 +298,6 @@ static int AndroidWindow_UpdateCrop(vout_display_sys_t *sys,
                              p_window->fmt.i_visible_height);
 }
 
-static unsigned int AndroidWindow_GetPicCount(vout_display_sys_t *sys,
-                                              android_window *p_window)
-{
-    VLC_UNUSED(sys);
-    return p_window->i_min_undequeued + p_window->i_pic_count;
-}
-
 static int AndroidWindow_SetSurface(vout_display_sys_t *sys,
                                     android_window *p_window,
                                     jobject jsurf)
@@ -361,7 +354,8 @@ static int AndroidWindow_SetupANWP(vout_display_sys_t *sys,
         p_window->i_pic_count = i_max_buffer_count - p_window->i_min_undequeued;
 
     if (sys->anwp.setBufferCount(p_window->p_handle_priv,
-                                 AndroidWindow_GetPicCount(sys, p_window)) != 0)
+                                 p_window->i_pic_count +
+                                 p_window->i_min_undequeued) != 0)
         goto error;
 
     if (sys->anwp.setOrientation(p_window->p_handle_priv,
@@ -732,7 +726,7 @@ static picture_pool_t *PoolAlloc(vout_display_t *vd, unsigned requested_count)
     if (SetupWindowSurface(sys, requested_count) != 0)
         goto error;
 
-    requested_count = AndroidWindow_GetPicCount(sys, sys->p_window);
+    requested_count = sys->p_window->i_pic_count;
     msg_Dbg(vd, "PoolAlloc: got %d frames", requested_count);
 
     UpdateWindowSize(&sys->p_window->fmt, sys->p_window->b_use_priv);



More information about the vlc-commits mailing list