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-parser.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-parser.c')
| -rw-r--r-- | src/db-artwork-parser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/db-artwork-parser.c b/src/db-artwork-parser.c index 5474458..7b84327 100644 --- a/src/db-artwork-parser.c +++ b/src/db-artwork-parser.c @@ -238,7 +238,7 @@ parse_mhii (DBParseContext *ctx, GError *error) Itdb_iTunesDB *itunesdb; guint64 dbid; guint64 mactime; - Itdb_iTunesDB *itdb = db_get_itunesdb (ctx->db); + Itdb_Device *device = db_get_device (ctx->db); mhii = db_parse_context_get_m_header (ctx, MhiiHeader, "mhii"); if (mhii == NULL) @@ -280,9 +280,9 @@ parse_mhii (DBParseContext *ctx, GError *error) artwork->rating = get_gint32 (mhii->rating, ctx->byte_order); artwork->unk036 = get_gint32 (mhii->unknown6, ctx->byte_order); mactime = get_gint32 (mhii->orig_date, ctx->byte_order); - artwork->creation_date = itdb_time_mac_to_time_t (itdb, mactime); + artwork->creation_date = device_time_mac_to_time_t (device, mactime); mactime = get_gint32 (mhii->digitized_date, ctx->byte_order); - artwork->digitized_date = itdb_time_mac_to_time_t (itdb, mactime); + artwork->digitized_date = device_time_mac_to_time_t (device, mactime); artwork->artwork_size = get_gint32 (mhii->orig_img_size, ctx->byte_order); if (song) |
