[vlc-commits] picture_chain: add a function to check if the chain has more than one picture
Steve Lhomme
git at videolan.org
Mon Oct 19 09:35:45 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Oct 15 16:20:11 2020 +0200| [04b7bd56d9b13e7f4bca7d1bca46915f1175d96a] | committer: Steve Lhomme
picture_chain: add a function to check if the chain has more than one picture
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04b7bd56d9b13e7f4bca7d1bca46915f1175d96a
---
include/vlc_picture.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/vlc_picture.h b/include/vlc_picture.h
index e5be1be14a..02fe7ea6a2 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 !vlc_picture_chain_IsEmpty(chain) && chain->front != chain->tail;
+}
+
/**
* Pop the front of a picture chain.
*
More information about the vlc-commits
mailing list