diff options
author | Bastien Nocera <hadess@hadess.net> | 2009-11-02 15:59:02 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2009-11-02 16:03:03 +0000 |
commit | 1fcd7b100b9df1f2b8407115aec910ce8cbe5f9c (patch) | |
tree | 07c183369d68a710ad26f17f7425de9b76c46ae0 /src/totem-uri.c | |
parent | 99eb9ea5d04b5736f603671d29d04f3df2058efc (diff) | |
download | totem-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.c | 11 |
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 |