[vlc-devel] [PATCH 05/11] vlc_es.h: add es_format_Replace() to explicitly initialize an ES from another ES
Steve Lhomme
robux4 at videolabs.io
Thu Jul 13 15:44:38 CEST 2017
The destination pointer must be an initialized es_format_t.
--
replaces https://patches.videolan.org/patch/17462/
- remove VLC_USED mention
---
include/vlc_es.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/vlc_es.h b/include/vlc_es.h
index e9d11d85a8..660d21bc21 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -638,6 +638,17 @@ VLC_API int es_format_Copy( es_format_t *p_dst, const es_format_t *p_src );
VLC_API void es_format_Clean( es_format_t *fmt );
/**
+ * This functions initializes an es_format_t from another es_format_t.
+ *
+ * The destination pointer must be an initialized es_format.
+ */
+static inline int es_format_Replace( es_format_t *p_dst, const es_format_t *p_src )
+{
+ es_format_Clean( p_dst );
+ return es_format_Copy( p_dst, p_src );
+}
+
+/**
* This function will check if the first ES format is similar
* to the second one.
*
--
2.12.1
More information about the vlc-devel
mailing list