changeset 3717:8ec5bb8aac58

playback_get_length(): Support InputPlayback::set_params().
author William Pitcock <nenolod@atheme.org>
date Thu, 11 Oct 2007 16:14:21 -0500
parents 9489aae0d872
children a98b1189777b
files src/audacious/playback.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/playback.c	Thu Oct 11 19:25:08 2007 +0200
+++ b/src/audacious/playback.c	Thu Oct 11 16:14:21 2007 -0500
@@ -162,11 +162,15 @@
     g_return_val_if_fail(playback_get_playing(), -1);
     playback = get_current_input_playback();
 
+    if (playback->length)
+        return playback->length;
+
     if (playback && playback->plugin->get_song_tuple) {
         Tuple *tuple = playback->plugin->get_song_tuple(playback->filename);
         if (tuple_get_value_type(tuple, FIELD_LENGTH, NULL) == TUPLE_INT)
             return tuple_get_value_type(tuple, FIELD_LENGTH, NULL);
     }
+
     return -1;
 }