int i_our_duration;
int i_mux_rate;
+ char* psz_title;
+ char* psz_artist;
+ char* psz_copyright;
+ char* psz_description;
+
int i_track;
real_track_t **track;
uint8_t buffer[65536];
int64_t i_pcr;
-
- vlc_meta_t *p_meta;
};
static int Demux( demux_t *p_demux );
case DEMUX_GET_META:
{
- vlc_meta_t **pp_meta = (vlc_meta_t**)va_arg( args, vlc_meta_t** );
- *pp_meta = p_sys->p_meta;
+ vlc_meta_t *p_meta = (vlc_meta_t*)va_arg( args, vlc_meta_t* );
+
+ /* the core will crash if we provide NULL strings, so check
+ * every string first */
+ if( p_sys->psz_title )
+ vlc_meta_SetTitle( p_meta, p_sys->psz_title );
+ if( p_sys->psz_artist )
+ vlc_meta_SetArtist( p_meta, p_sys->psz_artist );
+ if( p_sys->psz_copyright )
+ vlc_meta_SetCopyright( p_meta, p_sys->psz_copyright );
+ if( p_sys->psz_description )
+ vlc_meta_SetDescription( p_meta, p_sys->psz_description );
return VLC_SUCCESS;
}
uint32_t i_size;
int64_t i_skip;
int i_version;
-
- p_sys->p_meta = vlc_meta_New();
for( ;; )
{
msg_Dbg( p_demux, " - title=`%s'", psz );
EnsureUTF8( psz );
- vlc_meta_SetTitle( p_sys->p_meta, psz );
+ asprintf( &p_sys->psz_title, psz );
free( psz );
i_skip -= i_len;
}
msg_Dbg( p_demux, " - author=`%s'", psz );
EnsureUTF8( psz );
- vlc_meta_SetArtist( p_sys->p_meta, psz );
+ asprintf( &p_sys->psz_artist, psz );
free( psz );
i_skip -= i_len;
}
msg_Dbg( p_demux, " - copyright=`%s'", psz );
EnsureUTF8( psz );
- vlc_meta_SetCopyright( p_sys->p_meta, psz );
+ asprintf( &p_sys->psz_copyright, psz );
free( psz );
i_skip -= i_len;
}
msg_Dbg( p_demux, " - comment=`%s'", psz );
EnsureUTF8( psz );
- vlc_meta_SetDescription( p_sys->p_meta, psz );
+ asprintf( &p_sys->psz_description, psz );
free( psz );
i_skip -= i_len;
}