[vlc-devel] [PATCH 7/9] vlc_es.h: add es_format_Replace() to explicitly initialize an ES from another ES
robux4 at videolabs.io
Wed Jul 12 16:54:10 CEST 2017
The destination pointer must be an initialized es_format_t.
include/vlc_es.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/vlc_es.h b/include/vlc_es.h
index a428b561c2..6c40d67bf0 100644
@@ -641,6 +641,18 @@ 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.
+/* VLC_USED for now we're okay with losing strings and extradata */
+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.
More information about the vlc-devel