[vlc-commits] vlc_es: add es_format_Change helper
Francois Cartegnie
git at videolan.org
Wed Jul 5 12:05:22 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul 5 11:48:25 2017 +0200| [1a3c579095ceb628c5599694fd1c020a1b89b608] | committer: Francois Cartegnie
vlc_es: add es_format_Change helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1a3c579095ceb628c5599694fd1c020a1b89b608
---
include/vlc_es.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/vlc_es.h b/include/vlc_es.h
index bff3562d4e..bc55bdd1e4 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -639,4 +639,14 @@ VLC_API void es_format_Clean( es_format_t *fmt );
*/
VLC_API bool es_format_IsSimilar( const es_format_t *, const es_format_t * );
+/**
+ * Changes ES format to another category
+ * Format must have been properly initialized
+ */
+static inline void es_format_Change( es_format_t *fmt, int i_cat, vlc_fourcc_t i_codec )
+{
+ es_format_Clean( fmt );
+ es_format_Init( fmt, i_cat, i_codec );
+}
+
#endif
More information about the vlc-commits
mailing list