From b9693b2a4c60ed2944bd21014c6a33d8fdc1e990 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Sun, 7 Feb 2010 15:17:53 +0100 Subject: proper merge of streamer changes from master --- plugins/gtkui/callbacks.c | 2 +- plugins/gtkui/gtkui.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index 393a1b27..d5a4f0c3 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -1011,7 +1011,7 @@ seekbar_draw (GtkWidget *widget) { return; } DB_playItem_t *trk = deadbeef->streamer_get_playing_track (); - DB_fileinfo_t *dec = deadbeef->streamer_get_current_decoder (); + DB_fileinfo_t *dec = deadbeef->streamer_get_current_fileinfo (); if (!dec || deadbeef->pl_get_item_duration (trk) < 0) { clearlooks_rounded_rectangle (cr, 2, widget->allocation.height/2-4, widget->allocation.width-4, 8, 4, 0xff); theme_set_cairo_source_rgb (cr, COLO_SEEKBAR_FRONT); diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index 954a7781..8b1d3b1b 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -85,14 +85,14 @@ update_songinfo (gpointer ctx) { DB_playItem_t *track = deadbeef->streamer_get_playing_track (); - float duration = deadbeef->pl_get_item_duration (track); + float duration = track ? deadbeef->pl_get_item_duration (track) : -1; if (deadbeef->get_output ()->state () == OUTPUT_STATE_STOPPED) { snprintf (sbtext_new, sizeof (sbtext_new), "Stopped | %d tracks | %s total playtime", deadbeef->pl_getcount (PL_MAIN), totaltime_str); songpos = 0; } else { - DB_fileinfo_t *c = deadbeef->streamer_get_current_decoder (); + DB_fileinfo_t *c = deadbeef->streamer_get_current_fileinfo (); if (c) { float playpos = deadbeef->streamer_get_playpos (); int minpos = playpos / 60; -- cgit v1.2.3