changeset 2098:425963ded156 trunk

[svn] - provide the old ABI for plugins (intermediate layer). Pointed out by yaz, pointy hat to me.
author nenolod
date Mon, 11 Dec 2006 05:49:54 -0800
parents 75100f6b216a
children 14f049193031
files ChangeLog audacious/playlist.c audacious/playlist.h audacious/pluginenum.c
diffstat 4 files changed, 36 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 <nenolod@nenolod.net>
+  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 <nenolod@nenolod.net>
   revision [3197]
   - avoid a crash
--- 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;
     }
--- 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);
--- 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;