summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorg Schuler <jcsjcs@users.sourceforge.net>2005-11-12 13:58:50 +0000
committerJorg Schuler <jcsjcs@users.sourceforge.net>2005-11-12 13:58:50 +0000
commitdb54c3db957867c23252c22fbfcc15d5d6fdd248 (patch)
tree9ad39e368deb6c61c8474e9cc285d0038c4d0b9d
parentd57f8a1f517dd445bac338ef8507340d1b9a8576 (diff)
downloadlibgpod-db54c3db957867c23252c22fbfcc15d5d6fdd248.tar.gz
libgpod-db54c3db957867c23252c22fbfcc15d5d6fdd248.tar.xz
libgpod-db54c3db957867c23252c22fbfcc15d5d6fdd248.zip
* src/itdb_track.c: (itdb_track_set_defaults) only change unk208
(audio/video) if not already set to non-zero. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1148 f01d2545-417e-4e96-918e-98f8d0dbbcb6
-rw-r--r--ChangeLog5
-rw-r--r--src/itdb_track.c34
2 files changed, 25 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 2331933..129788f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-12 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+ * src/itdb_track.c: (itdb_track_set_defaults) only change unk208
+ (audio/video) if not already set to non-zero.
+
2005-11-11 Jorg Schuler <jcsjcs at users.sourceforge.net>
* src/itdb_itunesdb.c: (itdb_set_mountpoint) do not call
diff --git a/src/itdb_track.c b/src/itdb_track.c
index d7ff6a4..cfce01f 100644
--- a/src/itdb_track.c
+++ b/src/itdb_track.c
@@ -1,4 +1,4 @@
-/* Time-stamp: <2005-10-12 01:04:36 jcs>
+/* Time-stamp: <2005-11-12 22:57:11 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -138,21 +138,27 @@ static void itdb_track_set_defaults (Itdb_Track *tr)
tr->unk144 = 0x00; /* default value */
}
}
- if (is_video_ipod (tr->itdb->device)) {
- /* 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. */
- /* Only doing that for iPod videos since it remains to be proven that
- * setting unk208 to non-0 doesn't upset older ipod models
+ if (is_video_ipod (tr->itdb->device))
+ {
+ /* 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. */
+ /* Only doing that for iPod videos since it remains to be
+ * proven that setting unk208 to non-0 doesn't upset older
+ * ipod models
*/
- if (haystack (tr->filetype, m4v_desc))
- {
- /* set type to video (0x00000002) */
- tr->unk208 = 0x00000002;
- }
- else
+ if (tr->unk208 == 0)
{
- /* set type to audio */
- tr->unk208 = 0x00000001;
+ if (haystack (tr->filetype, m4v_desc))
+ {
+ /* set type to video (0x00000002) */
+ tr->unk208 = 0x00000002;
+ }
+ else
+ {
+ /* set type to audio */
+ tr->unk208 = 0x00000001;
+ }
}
}
/* The sample rate of the song expressed as an IEEE 32 bit