[vlc-devel] [PATCH] vout_ManageWrapper: reset display pool after we reset render

Rafaël Carré funman at videolan.org
Tue Jul 23 10:27:15 CEST 2013


Fixes: #3899
---
 include/vlc_vout_wrapper.h      | 2 +-
 src/video_output/display.c      | 4 +++-
 src/video_output/vout_wrapper.c | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/vlc_vout_wrapper.h b/include/vlc_vout_wrapper.h
index c249d39..575a51f 100644
--- a/include/vlc_vout_wrapper.h
+++ b/include/vlc_vout_wrapper.h
@@ -82,7 +82,7 @@ VLC_API bool vout_IsDisplayFiltered(vout_display_t *);
 VLC_API picture_t * vout_FilterDisplay(vout_display_t *, picture_t *);
 VLC_API bool vout_AreDisplayPicturesInvalid(vout_display_t *);
 
-VLC_API void vout_ManageDisplay(vout_display_t *, bool allow_reset_pictures);
+VLC_API bool vout_ManageDisplay(vout_display_t *, bool allow_reset_pictures);
 
 VLC_API void vout_SetDisplayFullscreen(vout_display_t *, bool is_fullscreen);
 VLC_API void vout_SetDisplayFilled(vout_display_t *, bool is_filled);
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 0d20a56..33734f1 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -755,7 +755,7 @@ static void VoutDisplayCropRatio(int *left, int *top, int *right, int *bottom,
     }
 }
 
-void vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
+bool vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
 {
     vout_display_owner_sys_t *osys = vd->owner.sys;
 
@@ -1055,6 +1055,8 @@ void vout_ManageDisplay(vout_display_t *vd, bool allow_reset_pictures)
     }
     if (reset_render)
         VoutDisplayResetRender(vd);
+
+    return reset_render;
 }
 
 bool vout_AreDisplayPicturesInvalid(vout_display_t *vd)
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 68099d9..2e24d63 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -181,8 +181,8 @@ void vout_ManageWrapper(vout_thread_t *vout)
     vout_thread_sys_t *sys = vout->p;
     vout_display_t *vd = sys->display.vd;
 
-    bool reset_display_pool = sys->display.use_dr && vout_AreDisplayPicturesInvalid(vd);
-    vout_ManageDisplay(vd, !sys->display.use_dr || reset_display_pool);
+    bool reset_display_pool = vout_AreDisplayPicturesInvalid(vd);
+    reset_display_pool |= vout_ManageDisplay(vd, !sys->display.use_dr || reset_display_pool);
 
     if (reset_display_pool) {
         sys->display.use_dr = !vout_IsDisplayFiltered(vd);
-- 
1.8.1.2



More information about the vlc-devel mailing list