[Swfdec] 3 commits - libswfdec/swfdec_sprite_movie.c player/swfplay.c
Benjamin Otte
company at kemper.freedesktop.org
Wed Aug 22 05:19:20 PDT 2007
libswfdec/swfdec_sprite_movie.c | 33 +++++++++++++++++++++++++++++++--
player/swfplay.c | 6 +++++-
2 files changed, 36 insertions(+), 3 deletions(-)
New commits:
diff-tree 361082fdf6ede11a08266193ca00247490121f6e (from parents)
Merge: 906a2ce832b317cdb0d5cd6fefe01fe17a676cd0 adebed995585fa9f993062a75df17ff464113e93
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Aug 22 14:19:14 2007 +0200
Merge branch 'master' of ssh://company@git.freedesktop.org/git/swfdec/swfdec
diff-tree 906a2ce832b317cdb0d5cd6fefe01fe17a676cd0 (from b822fe6102c568328608dcce05a412c848005f88)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Aug 22 14:18:52 2007 +0200
only quit the main loop once
diff --git a/player/swfplay.c b/player/swfplay.c
index 996deb2..7521acf 100644
--- a/player/swfplay.c
+++ b/player/swfplay.c
@@ -62,7 +62,11 @@ static void
do_fscommand (SwfdecPlayer *player, const char *command, const char *value, gpointer window)
{
if (g_str_equal (command, "quit")) {
- gtk_main_quit ();
+ static gboolean already_quit = FALSE;
+ if (!already_quit) {
+ gtk_main_quit ();
+ already_quit = TRUE;
+ }
}
/* FIXME: add more */
}
diff-tree b822fe6102c568328608dcce05a412c848005f88 (from c5efffeed0afc0e64f4d01a4323c9137189bf41f)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Aug 22 14:16:17 2007 +0200
only delete movies with a depth between -16384 and 0 when restarting
This fixes lots of issues with movies that were suddenly gone for no reason.
In particular, it makes bloxorz.swf playable.
diff --git a/libswfdec/swfdec_sprite_movie.c b/libswfdec/swfdec_sprite_movie.c
index 9af9370..21a98c6 100644
--- a/libswfdec/swfdec_sprite_movie.c
+++ b/libswfdec/swfdec_sprite_movie.c
@@ -348,6 +348,22 @@ swfdec_movie_is_compatible (SwfdecMovie
return TRUE;
}
+static GList *
+my_g_list_split (GList *list, GList *split)
+{
+ GList *prev;
+
+ if (split == NULL)
+ return list;
+
+ prev = split->prev;
+ if (prev == NULL)
+ return NULL;
+ prev->next = NULL;
+ split->prev = NULL;
+ return list;
+}
+
void
swfdec_sprite_movie_goto (SwfdecSpriteMovie *movie, guint goto_frame)
{
@@ -377,9 +393,22 @@ swfdec_sprite_movie_goto (SwfdecSpriteMo
SWFDEC_DEBUG ("performing goto %u -> %u for character %u",
movie->frame, goto_frame, SWFDEC_CHARACTER (movie->sprite)->id);
if (goto_frame < movie->frame) {
+ GList *walk;
movie->frame = 0;
- old = mov->list;
- mov->list = NULL;
+ for (walk = mov->list; walk &&
+ swfdec_depth_classify (SWFDEC_MOVIE (walk->data)->depth) != SWFDEC_DEPTH_CLASS_TIMELINE;
+ walk = walk->next) {
+ /* do nothing */
+ }
+ old = walk;
+ mov->list = my_g_list_split (mov->list, old);
+ for (walk = old; walk &&
+ swfdec_depth_classify (SWFDEC_MOVIE (walk->data)->depth) == SWFDEC_DEPTH_CLASS_TIMELINE;
+ walk = walk->next) {
+ /* do nothing */
+ }
+ old = my_g_list_split (old, walk);
+ mov->list = g_list_concat (mov->list, walk);
n = goto_frame;
movie->next_action = 0;
} else {
More information about the Swfdec
mailing list