+/**************************************************************************
+ * static mlist_is_writable (private)
+ *
+ * Raise exception and return 0 when the media_list instance is read-only,
+ * or else return 1.
+ **************************************************************************/
+static inline
+int mlist_is_writable( libvlc_media_list_t *p_mlist, libvlc_exception_t *p_e )
+{
+ if( !p_mlist||p_mlist->b_read_only )
+ {
+ /* We are read-only from user side */
+ libvlc_exception_raise( p_e, "Cannot write to read-only media list." );
+ return 0;
+ }
+ return 1;
+}
+