[vlc-devel] [PATCH 1/2] picture_chain: add a function to check if the chain has more than one picture

Steve Lhomme robux4 at ycbcr.xyz
Thu Oct 15 16:33:21 CEST 2020


---
 include/vlc_picture.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/vlc_picture.h b/include/vlc_picture.h
index e5be1be14ab..26296fe6245 100644
--- a/include/vlc_picture.h
+++ b/include/vlc_picture.h
@@ -205,6 +205,14 @@ static inline bool vlc_picture_chain_IsEmpty(const vlc_picture_chain_t *chain)
     return chain->front == NULL;
 }
 
+/**
+ * Check whether a picture chain has more than one picture.
+ */
+static inline bool vlc_picture_chain_HasNext(const vlc_picture_chain_t *chain)
+{
+    return chain->front != NULL && chain->front != chain->tail;
+}
+
 /**
  * Pop the front of a picture chain.
  *
-- 
2.26.2



More information about the vlc-devel mailing list