summaryrefslogtreecommitdiff
path: root/src/totem-uri.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2009-11-02 15:59:02 +0000
committerBastien Nocera <hadess@hadess.net>2009-11-02 16:03:03 +0000
commit1fcd7b100b9df1f2b8407115aec910ce8cbe5f9c (patch)
tree07c183369d68a710ad26f17f7425de9b76c46ae0 /src/totem-uri.c
parent99eb9ea5d04b5736f603671d29d04f3df2058efc (diff)
downloadtotem-1fcd7b100b9df1f2b8407115aec910ce8cbe5f9c.tar.gz
Fix saving current position for the wrong playlist item
When skipping to the next item in the playlist, we used to use totem_get_current_mrl(), which gets the current item from the playlist. Except that the playlist thinks we're already at the next item. Also use different variables to store the startup and the restore positions, as we don't want to pause newly added items. https://bugzilla.gnome.org/show_bug.cgi?id=600425
Diffstat (limited to 'src/totem-uri.c')
-rw-r--r--src/totem-uri.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/totem-uri.c b/src/totem-uri.c
index a39358b14..c96401b72 100644
--- a/src/totem-uri.c
+++ b/src/totem-uri.c
@@ -683,22 +683,19 @@ void
totem_save_position (Totem *totem)
{
gint64 stream_length, position;
- char *mrl, *pos_str;
+ char *pos_str;
GFile *file;
GError *error = NULL;
if (totem->remember_position == FALSE)
return;
+ if (totem->mrl == NULL)
+ return;
stream_length = bacon_video_widget_get_stream_length (totem->bvw);
position = bacon_video_widget_get_current_time (totem->bvw);
- mrl = totem_get_current_mrl (totem);
- if (mrl == NULL)
- return;
-
- file = g_file_new_for_uri (mrl);
- g_free (mrl);
+ file = g_file_new_for_uri (totem->mrl);
/* Don't save if it's:
* - a live stream