diff options
author | Christophe Fergeau <teuf@gnome.org> | 2005-11-02 19:00:22 +0000 |
---|---|---|
committer | Christophe Fergeau <teuf@gnome.org> | 2005-11-02 19:00:22 +0000 |
commit | fd77fc4d19f8fe25dcd1e2a7f8b1f950b2b89c25 (patch) | |
tree | 6f39ef88e2ebe202dff93456a77850bd75bcdf24 /src | |
parent | 55510ab97188728af5255333865dc226b6edb242 (diff) | |
download | libgpod-fd77fc4d19f8fe25dcd1e2a7f8b1f950b2b89c25.tar.gz libgpod-fd77fc4d19f8fe25dcd1e2a7f8b1f950b2b89c25.tar.xz libgpod-fd77fc4d19f8fe25dcd1e2a7f8b1f950b2b89c25.zip |
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
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1135 f01d2545-417e-4e96-918e-98f8d0dbbcb6
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 */ |