[vlc-commits] video_output: don't pass the subpicture to internal vout_display_Display()

Steve Lhomme git at videolan.org
Sat Oct 27 10:14:59 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Oct 26 10:31:55 2018 +0200| [e7749c2efd5802bf7defe49048d80c6c90e196c8] | committer: Thomas Guillem

video_output: don't pass the subpicture to internal vout_display_Display()

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

 src/video_output/display.c      | 2 +-
 src/video_output/video_output.c | 4 +++-
 src/video_output/vout_wrapper.h | 6 +-----
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index 17ad94ac7f..1e215bc42c 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1087,7 +1087,7 @@ static void SplitterDisplay(vout_display_t *vd, picture_t *picture)
 
     for (int i = 0; i < sys->count; i++) {
         if (sys->picture[i])
-            vout_display_Display(sys->display[i], sys->picture[i], NULL);
+            vout_display_Display(sys->display[i], sys->picture[i]);
     }
 }
 static int SplitterControl(vout_display_t *vd, int query, va_list args)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index db8cc6d9ee..cc95c4d874 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1233,7 +1233,9 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
 
     /* Display the direct buffer returned by vout_RenderPicture */
     sys->displayed.date = vlc_tick_now();
-    vout_display_Display(vd, todisplay, subpic);
+    vout_display_Display(vd, todisplay);
+    if (subpic)
+        subpicture_Delete(subpic);
 
     vout_statistic_AddDisplayed(&sys->statistic, 1);
 
diff --git a/src/video_output/vout_wrapper.h b/src/video_output/vout_wrapper.h
index 58df546735..89265568a2 100644
--- a/src/video_output/vout_wrapper.h
+++ b/src/video_output/vout_wrapper.h
@@ -51,15 +51,11 @@ static inline void vout_display_Prepare(vout_display_t *vd,
 /**
  * It display a picture.
  */
-static inline void vout_display_Display(vout_display_t *vd,
-                                        picture_t *picture,
-                                        subpicture_t *subpicture)
+static inline void vout_display_Display(vout_display_t *vd, picture_t *picture)
 {
     if (vd->display)
         vd->display(vd, picture);
     picture_Release(picture);
-    if (subpicture)
-        subpicture_Delete(subpicture);
 }
 
 /**



More information about the vlc-commits mailing list