1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

o fix build, as latest libcddb update had API changes

patches obtained:               libcdio CVS
This commit is contained in:
Michael Landin 2005-07-11 15:00:47 +00:00
parent 7bbc3422ca
commit dd6a179982
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=138915
2 changed files with 81 additions and 0 deletions

View File

@ -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

View File

@ -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.");