changeset 4530:d2fd41d3964e

Stop playback (instead of doing endless loop) when file can't be read
author Tomasz Mon <desowin@gmail.com>
date Fri, 02 May 2008 10:34:07 +0200
parents 6cf91e97c6d5
children cbb1f66d8971
files src/audacious/playback.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/playback.c	Wed Apr 30 23:53:20 2008 +0200
+++ b/src/audacious/playback.c	Fri May 02 10:34:07 2008 +0200
@@ -176,10 +176,13 @@
 
     entry = playlist_get_entry_to_play(playlist);
     g_return_if_fail(entry != NULL);
+
+    if (!playback_play_file(entry))
+        return;
+
 #ifdef USE_DBUS
     mpris_emit_track_change(mpris);
 #endif
-    playback_play_file(entry);
 
     playlist_check_pos_current(playlist);
 
@@ -385,6 +388,11 @@
 
             g_free(pr);
         }
+        else
+        {
+            mainwin_stop_pushed();
+            return FALSE;
+        }
     }
 
     if (!entry->decoder || !entry->decoder->enabled)