From db54c3db957867c23252c22fbfcc15d5d6fdd248 Mon Sep 17 00:00:00 2001 From: Jorg Schuler Date: Sat, 12 Nov 2005 13:58:50 +0000 Subject: * 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 --- ChangeLog | 5 +++++ src/itdb_track.c | 34 ++++++++++++++++++++-------------- 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 + + * 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 * 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 | 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 -- cgit