summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorMichael Landin <mich@FreeBSD.org>2005-07-11 15:00:47 +0000
committerMichael Landin <mich@FreeBSD.org>2005-07-11 15:00:47 +0000
commitdd6a179982c72653dacd9ef0f93755be3444179e (patch)
tree373c6b091437d3219a89e6a8577aeb5062c78828 /sysutils
parentUpdate to 2.18.3, bug-fixes: (diff)
o fix build, as latest libcddb update had API changes
patches obtained: libcdio CVS
Notes
Notes: svn path=/head/; revision=138915
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/libcdio/files/patch-src_cdda-player.c58
-rw-r--r--sysutils/libcdio/files/patch-src_cddb.c23
2 files changed, 81 insertions, 0 deletions
diff --git a/sysutils/libcdio/files/patch-src_cdda-player.c b/sysutils/libcdio/files/patch-src_cdda-player.c
new file mode 100644
index 000000000000..1331f1d5d7c3
--- /dev/null
+++ b/sysutils/libcdio/files/patch-src_cdda-player.c
@@ -0,0 +1,58 @@
+
+$FreeBSD$
+
+--- src/cdda-player.c.orig
++++ src/cdda-player.c
+@@ -381,12 +381,6 @@
+ return b_ok;
+ }
+
+-#define add_cddb_disc_info(format_str, field) \
+- if (p_cddb_disc->field && !strlen(field)) { \
+- snprintf(field, sizeof(field), format_str, p_cddb_disc->field); \
+- b_cdtext_ ## field = false; \
+- }
+-
+ static void
+ get_cddb_disc_info(CdIo_t *p_cdio)
+ {
+@@ -394,10 +388,12 @@
+ b_db = init_cddb(p_cdio, &p_conn, &p_cddb_disc, xperror, i_first_track,
+ i_tracks, &i_cddb_matches);
+ if (b_db) {
+- add_cddb_disc_info("%s", artist);
+- add_cddb_disc_info("%s", title);
+- add_cddb_disc_info("%s", genre);
+- add_cddb_disc_info("%4d", year);
++ int i_year;
++ i_year = atoi(year);
++ cddb_disc_set_artist(p_cddb_disc, artist);
++ cddb_disc_set_title(p_cddb_disc, title);
++ cddb_disc_set_genre(p_cddb_disc, genre);
++ cddb_disc_set_year(p_cddb_disc, i_year);
+ }
+ #endif
+ return;
+@@ -687,11 +683,6 @@
+
+ }
+
+-#define add_cddb_track_info(format_str, field) \
+- if (t->field) \
+- snprintf(cd_info[i_track].field, sizeof(cd_info[i_track].field)-1, \
+- format_str, t->field);
+-
+ static void
+ get_cddb_track_info(track_t i_track)
+ {
+@@ -699,8 +690,8 @@
+ cddb_track_t *t = cddb_disc_get_track(p_cddb_disc,
+ i_track - i_first_track);
+ if (t) {
+- add_cddb_track_info("%s", title);
+- add_cddb_track_info("%s", artist);
++ cddb_track_set_title(t, title);
++ cddb_track_set_artist(t, artist);
+ }
+
+ #else
diff --git a/sysutils/libcdio/files/patch-src_cddb.c b/sysutils/libcdio/files/patch-src_cddb.c
new file mode 100644
index 000000000000..3ec5ac21ef2d
--- /dev/null
+++ b/sysutils/libcdio/files/patch-src_cddb.c
@@ -0,0 +1,23 @@
+
+$FreeBSD$
+
+--- src/cddb.c.orig
++++ src/cddb.c
+@@ -117,13 +117,14 @@
+ }
+ for(i = 0; i < i_tracks; i++) {
+ cddb_track_t *t = cddb_track_new();
+- t->frame_offset = cdio_get_track_lba(p_cdio, i+i_first_track);
++ cddb_track_set_frame_offset(t,
++ cdio_get_track_lba(p_cdio, i+i_first_track));
+ cddb_disc_add_track(*pp_cddb_disc, t);
+ }
+
+- (*pp_cddb_disc)->length =
++ cddb_disc_set_length(*pp_cddb_disc,
+ cdio_get_track_lba(p_cdio, CDIO_CDROM_LEADOUT_TRACK)
+- / CDIO_CD_FRAMES_PER_SEC;
++ / CDIO_CD_FRAMES_PER_SEC);
+
+ if (!cddb_disc_calc_discid(*pp_cddb_disc)) {
+ errmsg("libcddb calc discid failed.");