diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/db-artwork-writer.c | 1 | ||||
-rw-r--r-- | src/itdb_track.c | 15 |
2 files changed, 15 insertions, 1 deletions
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 */ |