decoder.c
branchtrunk
changeset 2 4c1f7b705009
parent 0 474a1293c3c0
child 15 710f847b02af
     1.1 --- a/decoder.c	Sat Dec 29 14:47:49 2007 +0100
     1.2 +++ b/decoder.c	Sat Dec 29 14:49:09 2007 +0100
     1.3 @@ -1,7 +1,7 @@
     1.4  /*
     1.5   * MP3/MPlayer plugin to VDR (C++)
     1.6   *
     1.7 - * (C) 2001-2005 Stefan Huelswitt <s.huelswitt@gmx.de>
     1.8 + * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
     1.9   *
    1.10   * This code is free software; you can redistribute it and/or
    1.11   * modify it under the terms of the GNU General Public License
    1.12 @@ -460,6 +460,12 @@
    1.13    lastpurge=time(0)-(50*60);
    1.14  }
    1.15  
    1.16 +void cInfoCache::Shutdown(void)
    1.17 +{
    1.18 +  Cancel(10);
    1.19 +  Save(true);
    1.20 +}
    1.21 +
    1.22  void cInfoCache::Cache(cSongInfo *info, cFileInfo *file)
    1.23  {
    1.24    lock.Lock();
    1.25 @@ -569,7 +575,7 @@
    1.26  
    1.27  void cInfoCache::Save(bool force)
    1.28  {
    1.29 -  if(!Purge() && modified && (force || time(0)>lasttime)) {
    1.30 +  if(modified && (force || (!Purge() && time(0)>lasttime))) {
    1.31      char *name=CacheFile();
    1.32      cSafeFile f(name);
    1.33      free(name);