summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-02-07 15:17:53 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-02-07 15:17:53 +0100
commitb9693b2a4c60ed2944bd21014c6a33d8fdc1e990 (patch)
tree81fba23445c2389df3c92c143a39c2b32e16677c /plugins
parent8f8d6ac219e0c1354110e0c5ab796ab183ff59b4 (diff)
proper merge of streamer changes from master
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/callbacks.c2
-rw-r--r--plugins/gtkui/gtkui.c4
2 files changed, 3 insertions, 3 deletions
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;