[rhythmbox] don't return uninitialized var RBGstPlayer::play
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] don't return uninitialized var RBGstPlayer::play
- Date: Fri, 1 Oct 2010 14:08:09 +0000 (UTC)
commit 223974a6cd2410dfa1dae06c4dd128f7b2a7ae6b
Author: Christophe Fergeau <teuf gnome org>
Date: Fri Oct 1 15:58:36 2010 +0200
don't return uninitialized var RBGstPlayer::play
The "result" variable is returned uninitialized most of the time,
which result in erratic behaviour when that happens (I was getting
tons of unexplained playback errors). This function doesn't try to
catch error conditions anymore, so just make it return TRUE.
backends/gstreamer/rb-player-gst.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/backends/gstreamer/rb-player-gst.c b/backends/gstreamer/rb-player-gst.c
index 636da50..cdb998b 100644
--- a/backends/gstreamer/rb-player-gst.c
+++ b/backends/gstreamer/rb-player-gst.c
@@ -833,7 +833,6 @@ static gboolean
impl_play (RBPlayer *player, RBPlayerPlayType play_type, gint64 crossfade, GError **error)
{
RBPlayerGst *mp = RB_PLAYER_GST (player);
- gboolean result;
g_return_val_if_fail (mp->priv->playbin != NULL, FALSE);
@@ -846,7 +845,6 @@ impl_play (RBPlayer *player, RBPlayerPlayType play_type, gint64 crossfade, GErro
} else if (mp->priv->current_track_finishing) {
rb_debug ("current track finishing -> just setting URI on playbin");
g_object_set (mp->priv->playbin, "uri", mp->priv->uri, NULL);
- result = TRUE;
mp->priv->playbin_stream_changing = TRUE;
@@ -866,7 +864,6 @@ impl_play (RBPlayer *player, RBPlayerPlayType play_type, gint64 crossfade, GErro
g_signal_emit (player,
signals[REUSE_STREAM], 0,
mp->priv->uri, mp->priv->prev_uri, mp->priv->playbin);
- result = TRUE;
track_change_done (mp, *error);
}
}
@@ -879,7 +876,7 @@ impl_play (RBPlayer *player, RBPlayerPlayType play_type, gint64 crossfade, GErro
}
- return result;
+ return TRUE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]