[vlc-commits] vout: remove the use_dr flag

Rémi Denis-Courmont git at videolan.org
Wed Dec 26 13:31:53 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Dec 26 13:14:41 2018 +0200| [fbda94b7ffef267d3cfeac01da1b4515bdb4a3b3] | committer: Rémi Denis-Courmont

vout: remove the use_dr flag

The value is no longer used beyond the function that computes it.

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

 src/video_output/vout_internal.h |  1 -
 src/video_output/vout_wrapper.c  | 11 +++++------
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 655475a7ed..8726171368 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -91,7 +91,6 @@ struct vout_thread_sys_t
     /* */
     struct {
         vout_display_t *vd;
-        bool           use_dr;
         bool           use_copy;
     } display;
 
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 46b58f4ea4..f515ab4782 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -71,8 +71,8 @@ int vout_OpenWrapper(vout_thread_t *vout,
 
     sys->decoder_pool = NULL;
 
-    sys->display.use_dr = !vout_IsDisplayFiltered(vd);
-    const bool allow_dr = !vd->info.has_pictures_invalid && !vd->info.is_slow && sys->display.use_dr;
+    const bool use_dr = !vout_IsDisplayFiltered(vd);
+    const bool allow_dr = !vd->info.has_pictures_invalid && !vd->info.is_slow && use_dr;
     const unsigned private_picture  = 4; /* XXX 3 for filter, 1 for SPU */
     const unsigned decoder_picture  = 1 + sys->dpb_size;
     const unsigned kept_picture     = 1; /* last displayed picture */
@@ -98,7 +98,7 @@ int vout_OpenWrapper(vout_thread_t *vout,
         sys->decoder_pool = display_pool;
         sys->display_pool = display_pool;
     } else {
-        sys->display.use_copy = sys->display.use_dr;
+        sys->display.use_copy = use_dr;
         sys->decoder_pool =
             picture_pool_NewFromFormat(&vd->source,
                                        __MAX(VOUT_MAX_PICTURES,
@@ -111,7 +111,7 @@ int vout_OpenWrapper(vout_thread_t *vout,
         } else {
             sys->dpb_size = picture_pool_GetSize(sys->decoder_pool) - reserved_picture;
         }
-        if (sys->display.use_dr)
+        if (use_dr)
             sys->display_pool = vout_GetPool(vd, 3);
         else
             sys->display_pool = NULL;
@@ -170,9 +170,8 @@ void vout_ManageWrapper(vout_thread_t *vout)
 
     if (vout_ManageDisplay(vd)) {
         assert(vd->info.has_pictures_invalid);
-        sys->display.use_dr = !vout_IsDisplayFiltered(vd);
 
-        if (sys->display.use_dr)
+        if (!vout_IsDisplayFiltered(vd))
             sys->display_pool = vout_GetPool(vd, 3);
         else
             sys->display_pool = NULL;



More information about the vlc-commits mailing list