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

Rafaël Carré git at videolan.org
Thu Jul 25 13:43:54 CEST 2013


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Tue Jul 23 10:27:15 2013 +0200| [12aebf9421919cc9d79d6bdaf74f5a5905a67537] | committer: Jean-Baptiste Kempf

vout_ManageWrapper: reset display pool after we reset render

Fixes: #3899
(cherry picked from commit 3e92a084d4fe75e90a37dcc44e7c0d31d7faa4c5)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=12aebf9421919cc9d79d6bdaf74f5a5905a67537
---

 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 50599d0..1e4495b 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 a190f4c..bb017eb 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -190,8 +190,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) {
         NoDrClean(vout);



More information about the vlc-commits mailing list