+/****************************************************************************
+ * stream_CommonNew: create an empty stream structure
+ ****************************************************************************/
+stream_t *stream_CommonNew( vlc_object_t *p_obj )
+{
+ stream_t *s = (stream_t *)vlc_custom_create( p_obj, sizeof(*s),
+ VLC_OBJECT_GENERIC, "stream" );
+
+ if( !s )
+ return NULL;
+
+ s->p_text = malloc( sizeof(*s->p_text) );
+ if( !s->p_text )
+ {
+ vlc_object_release( s );
+ return NULL;
+ }
+
+ /* UTF16 and UTF32 text file conversion */
+ s->p_text->conv = (vlc_iconv_t)(-1);
+ s->p_text->i_char_width = 1;
+ s->p_text->b_little_endian = false;
+
+ return s;
+}
+void stream_CommonDelete( stream_t *s )
+{
+ if( s->p_text )
+ {
+ if( s->p_text->conv != (vlc_iconv_t)(-1) )
+ vlc_iconv_close( s->p_text->conv );
+ free( s->p_text );
+ }
+ vlc_object_release( s );
+}