[vlc-commits] mmal: deinterlace: use the picture_chain API

Steve Lhomme git at videolan.org
Wed Sep 23 16:18:08 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Sep 17 17:03:23 2020 +0200| [8630ba562fae53ffeb904c175c83e8e1a2432a8c] | committer: Steve Lhomme

mmal: deinterlace: use the picture_chain API

Received pictures are chained in ret_pics, first directly then through the
chain_tail local variable which keeps track of the tail of the picture chain.

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

 modules/hw/mmal/deinterlace.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/modules/hw/mmal/deinterlace.c b/modules/hw/mmal/deinterlace.c
index 13bbcc0a05..d3cc0cc603 100644
--- a/modules/hw/mmal/deinterlace.c
+++ b/modules/hw/mmal/deinterlace.c
@@ -262,7 +262,7 @@ static picture_t *deinterlace(filter_t * p_filter, picture_t * p_pic)
     }
 
     // Return anything that is in the out Q
-    picture_t ** pp_pic = &ret_pics;
+    picture_t * chain_tail = ret_pics;
 
     // Advanced di has a 3 frame latency, so if the seq delta is greater
     // than that then we are expecting at least two frames of output. Wait
@@ -284,8 +284,13 @@ static picture_t *deinterlace(filter_t * p_filter, picture_t * p_pic)
         }
         out_buf = NULL;  // Now attached to pic or recycled
 
-        *pp_pic = out_pic;
-        pp_pic = &out_pic->p_next;
+        if (ret_pics == NULL)
+        {
+            ret_pics = out_pic;
+            chain_tail = out_pic;
+        }
+        else
+            chain_tail = vlc_picture_chain_Append( chain_tail, out_pic );
 
         // Ignore 0 seqs
         // Don't think these should actually happen



More information about the vlc-commits mailing list