diff options
author | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2007-05-27 14:58:41 +0000 |
---|---|---|
committer | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2007-05-27 14:58:41 +0000 |
commit | eadf524ea1dcc64de5f47e91363dd192425acaf6 (patch) | |
tree | a51e1709cfe1715e1a5d6f1a8be4cb51be1bf149 /src/db-artwork-writer.c | |
parent | e59cd1d7ea0bedc1b4e39a1cfc2d1076eb17b322 (diff) | |
download | libgpod-eadf524ea1dcc64de5f47e91363dd192425acaf6.tar.gz libgpod-eadf524ea1dcc64de5f47e91363dd192425acaf6.tar.xz libgpod-eadf524ea1dcc64de5f47e91363dd192425acaf6.zip |
* src/db-artwork-parser.c
src/db-artwork-writer.c
src/itdb_device.c
src/itdb_itunesdb.c
src/itdb_private.h:
Fixed segfault when parsing photo databases introduced by the
new handling of timestamps (all timestamps exported are
host-local time_t).
itdb_time_time_t_to_mac() and itdb_time_mac_to_time_t() were
renamed to device_*() and take a pointer to an Itdb_Device
instead of a pointer to an Itdb_iTunesDB structure as the latter
does not exist in case of photo databases. All references to
those two functions were changed accordingly and the functions
themselves were moved from itdb_itunesdb.c to itdb_device.c.
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1439 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/db-artwork-writer.c')
-rw-r--r-- | src/db-artwork-writer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c index f84915a..9fef856 100644 --- a/src/db-artwork-writer.c +++ b/src/db-artwork-writer.c @@ -532,7 +532,7 @@ write_mhii (Itdb_DB *db, void *data, iPodBuffer *buffer) Itdb_Track *song; Itdb_Artwork *artwork; guint64 mactime; - Itdb_iTunesDB *itdb = db_get_itunesdb (db); + Itdb_Device *device = db_get_device (db); mhii = (MhiiHeader *)init_header (buffer, "mhii", sizeof (MhiiHeader)); if (mhii == NULL) { @@ -558,10 +558,10 @@ write_mhii (Itdb_DB *db, void *data, iPodBuffer *buffer) mhii->rating = get_gint32 (artwork->rating, buffer->byte_order); mhii->unknown6 = get_gint32 (artwork->unk036, buffer->byte_order); - mactime = itdb_time_time_t_to_mac (itdb, artwork->creation_date); + mactime = device_time_time_t_to_mac (device, artwork->creation_date); mhii->orig_date = get_guint32 (mactime, buffer->byte_order); - mactime = itdb_time_time_t_to_mac (itdb, artwork->digitized_date); + mactime = device_time_time_t_to_mac (device, artwork->digitized_date); mhii->digitized_date = get_guint32 (mactime, buffer->byte_order); mhii->orig_img_size = get_gint32 (artwork->artwork_size, buffer->byte_order); |