diff libaudcore/playback.c @ 398:f908bcd87c3d trunk

[svn] Generate cache content on demand if it was not previously there.
author nenolod
date Sat, 07 Jan 2006 10:13:28 -0800
parents 0a19db762240
children
line wrap: on
line diff
--- a/libaudcore/playback.c	Sat Jan 07 10:02:25 2006 -0800
+++ b/libaudcore/playback.c	Sat Jan 07 10:13:28 2006 -0800
@@ -83,7 +83,7 @@
 void
 bmp_playback_initiate(void)
 {
-    const PlaylistEntry *entry;
+    PlaylistEntry *entry;
 
     if (playlist_get_length() == 0)
         return;
@@ -201,7 +201,7 @@
 }
 
 gboolean
-bmp_playback_play_file(const PlaylistEntry *entry)
+bmp_playback_play_file(PlaylistEntry *entry)
 {
     g_return_val_if_fail(entry != NULL, FALSE);
 
@@ -214,6 +214,9 @@
     if (cfg.random_skin_on_play)
         bmp_playback_set_random_skin();
 
+    if (!entry->decoder)
+	entry->decoder = input_check_file(entry->filename, FALSE);
+
     if (!entry->decoder || !input_is_enabled(entry->decoder->filename))
     {
         input_file_not_playable(entry->filename);