summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/db-artwork-writer.c1
-rw-r--r--src/itdb_track.c15
3 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 37b4aac..a3b1790 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-11-02 Christophe Fergeau <teuf@gnome.org>
+
+ * src/db-artwork-writer.c: (ipod_buffer_destroy):
+ * src/itdb_track.c: (itdb_track_set_defaults): applied patch from
+ Uwe Hermann <uwe@hermann-uwe.de> to add video support to libgpod,
+ removed spurious g_print
+
2005-11-01 Jorg Schuler <jcsjcs at users.sourceforge.net>
* itdb_itunesdb.c (get16lint): fixed bug affecting big endian
diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c
index bf40f29..bfe3f62 100644
--- a/src/db-artwork-writer.c
+++ b/src/db-artwork-writer.c
@@ -69,7 +69,6 @@ ipod_buffer_destroy (iPodBuffer *buffer)
{
buffer->mmap->ref_count--;
if (buffer->mmap->ref_count == 0) {
- g_print ("Destroying mmap buffer\n");
ipod_mmap_buffer_destroy (buffer->mmap);
}
g_free (buffer);
diff --git a/src/itdb_track.c b/src/itdb_track.c
index 14ff740..1c02b41 100644
--- a/src/itdb_track.c
+++ b/src/itdb_track.c
@@ -61,6 +61,7 @@ static void itdb_track_set_defaults (Itdb_Track *tr)
gchar *mp4_desc[] = {"AAC", "MP4", "aac", "mp4", NULL};
gchar *audible_subdesc[] = {"Audible", "audible", "Book", "book", NULL};
gchar *wav_desc[] = {"WAV", "wav", NULL};
+ gchar *m4v_desc[] = {"M4V", "MP4", "MP4V", "m4v", "mp4", "mp4v", NULL};
g_return_if_fail (tr);
g_return_if_fail (tr->itdb);
@@ -124,6 +125,20 @@ static void itdb_track_set_defaults (Itdb_Track *tr)
tr->unk144 = 0x00; /* default value */
}
}
+ /* The unk208 field seems to denote whether the file is a video or not.
+ It seems that it must be set to 0x00000002 for video files. */
+ if (tr->unk208 == 0)
+ {
+ if (haystack (tr->filetype, m4v_desc))
+ {
+ /* set type to video (0x00000002) */
+ tr->unk208 = 0x00000002;
+ }
+ else
+ {
+ tr->unk208 = 0x00; /* default value */
+ }
+ }
/* The sample rate of the song expressed as an IEEE 32 bit
floating point number. It's uncertain why this is here. itdb
will set this when adding a track */