[vlc-devel] [PATCH] video output: code cleaning

Steve Lhomme robux4 at ycbcr.xyz
Fri Aug 30 07:41:19 CEST 2019


---
 src/video_output/video_output.c  | 8 ++++++--
 src/video_output/vout_internal.h | 2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index ef0d9488ae..7968a65f88 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -717,12 +717,16 @@ static picture_t *VoutVideoFilterStaticNewPicture(filter_t *filter)
 static void ThreadFilterFlush(vout_thread_t *vout, bool is_locked)
 {
     if (vout->p->displayed.current)
+    {
         picture_Release( vout->p->displayed.current );
-    vout->p->displayed.current = NULL;
+        vout->p->displayed.current = NULL;
+    }
 
     if (vout->p->displayed.next)
+    {
         picture_Release( vout->p->displayed.next );
-    vout->p->displayed.next = NULL;
+        vout->p->displayed.next = NULL;
+    }
 
     if (!is_locked)
         vlc_mutex_lock(&vout->p->filter.lock);
diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
index 3c5a7e2688..abf62d435f 100644
--- a/src/video_output/vout_internal.h
+++ b/src/video_output/vout_internal.h
@@ -125,7 +125,7 @@ struct vout_thread_sys_t
         vlc_tick_t  date;
         vlc_tick_t  timestamp;
         bool        is_interlaced;
-        picture_t   *decoded;
+        picture_t   *decoded; // decoded picture before passed through chain_static
         picture_t   *current;
         picture_t   *next;
     } displayed;
-- 
2.17.1



More information about the vlc-devel mailing list