# HG changeset patch # User nenolod # Date 1165844994 28800 # Node ID 425963ded156bc0e241374c1a45020f4b2d76e7c # Parent 75100f6b216aa4aac7be0651cd039b0bdb4c75ef [svn] - provide the old ABI for plugins (intermediate layer). Pointed out by yaz, pointy hat to me. diff -r 75100f6b216a -r 425963ded156 ChangeLog --- a/ChangeLog Mon Dec 11 05:47:05 2006 -0800 +++ b/ChangeLog Mon Dec 11 05:49:54 2006 -0800 @@ -1,3 +1,12 @@ +2006-12-11 13:47:05 +0000 William Pitcock + revision [3199] + - make sure &default_playlist (temporary construct) has full padding. + probably won't help this, but it seems like it wont hurt, either. + + trunk/audacious/playlist.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + + 2006-12-11 13:29:44 +0000 William Pitcock revision [3197] - avoid a crash diff -r 75100f6b216a -r 425963ded156 audacious/playlist.c --- a/audacious/playlist.c Mon Dec 11 05:47:05 2006 -0800 +++ b/audacious/playlist.c Mon Dec 11 05:49:54 2006 -0800 @@ -859,6 +859,29 @@ } void +playlist_set_info_old_abi(const gchar * title, gint length, gint rate, + gint freq, gint nch) +{ + Playlist *playlist = playlist_get_active(); + + PLAYLIST_LOCK(); + + g_return_if_fail(playlist != NULL); + + if (playlist->position) { + g_free(playlist->position->title); + playlist->position->title = g_strdup(title); + playlist->position->length = length; + } + + PLAYLIST_UNLOCK(); + + playlist_recalc_total_time(playlist); + + mainwin_set_song_info(rate, freq, nch); +} + +void playlist_set_info(Playlist * playlist, const gchar * title, gint length, gint rate, gint freq, gint nch) { @@ -867,8 +890,7 @@ g_return_if_fail(playlist != NULL); if (playlist->position) { -/* XXX: what is playlist->position->title is not dup'd? */ -// g_free(playlist->position->title); + g_free(playlist->position->title); playlist->position->title = g_strdup(title); playlist->position->length = length; } diff -r 75100f6b216a -r 425963ded156 audacious/playlist.h --- a/audacious/playlist.h Mon Dec 11 05:47:05 2006 -0800 +++ b/audacious/playlist.h Mon Dec 11 05:49:54 2006 -0800 @@ -108,6 +108,8 @@ void playlist_set_info(Playlist *playlist, const gchar * title, gint length, gint rate, gint freq, gint nch); +void playlist_set_info_old_abi(const gchar * title, gint length, gint rate, + gint freq, gint nch); void playlist_check_pos_current(Playlist *playlist); void playlist_next(Playlist *playlist); void playlist_prev(Playlist *playlist); diff -r 75100f6b216a -r 425963ded156 audacious/pluginenum.c --- a/audacious/pluginenum.c Mon Dec 11 05:47:05 2006 -0800 +++ b/audacious/pluginenum.c Mon Dec 11 05:49:54 2006 -0800 @@ -140,7 +140,7 @@ /* Pretty const casts courtesy of XMMS's plugin.h legacy. Anyone else thinks we could use a CONST macro to solve the warnings? - descender */ - p->set_info = (void (*)(gchar *, gint, gint, gint, gint)) playlist_set_info; + p->set_info = (void (*)(gchar *, gint, gint, gint, gint)) playlist_set_info_old_abi; p->set_info_text = (void (*)(gchar *)) input_set_info_text; p->set_status_buffering = (void (*)(gboolean)) input_set_status_buffering;