+static uint8_t * MetaRead( demux_t *p_demux, const uint8_t *p_peek )
+{
+ demux_sys_t *p_sys = p_demux->p_sys;
+
+ int i_len;
+ char *psz;
+
+ /* Title */
+ i_len = *p_peek ; p_peek++;
+ if( i_len > 0 )
+ {
+ psz = malloc( i_len + 1 );
+ memcpy( psz, p_peek, i_len );
+ psz[i_len] = '\0';
+
+ EnsureUTF8( psz );
+ msg_Dbg( p_demux, " - title=`%s'", psz );
+ p_sys->psz_title = psz;
+ }
+ p_peek += i_len;
+
+ /* Authors */
+ i_len = *p_peek ; p_peek++;
+ if( i_len > 0 )
+ {
+ psz = malloc( i_len + 1 );
+ memcpy( psz, p_peek, i_len );
+ psz[i_len] = '\0';
+
+ EnsureUTF8( psz );
+ msg_Dbg( p_demux, " - artist=`%s'", psz );
+ p_sys->psz_artist = psz;
+ }
+ p_peek += i_len;
+
+ /* Copyright */
+ i_len = *p_peek ; p_peek++;
+ if( i_len > 0 )
+ {
+ psz = malloc( i_len + 1 );
+ memcpy( psz, p_peek, i_len );
+ psz[i_len] = '\0';
+
+ EnsureUTF8( psz );
+ msg_Dbg( p_demux, " - Copyright=`%s'", psz );
+ p_sys->psz_copyright = psz;
+ }
+ p_peek += i_len;
+
+ /* Comment */
+ i_len = *p_peek ; p_peek++;
+ if( i_len > 0 )
+ {
+ psz = malloc( i_len + 1 );
+ memcpy( psz, p_peek, i_len );
+ psz[i_len] = '\0';
+
+ EnsureUTF8( psz );
+ msg_Dbg( p_demux, " - Comment=`%s'", psz );
+ p_sys->psz_description = psz;
+ }
+ p_peek += i_len;
+
+ return p_peek;
+}
+
+