[Swfdec-commits] 3 commits - swfdec/swfdec_as_context.c swfdec/swfdec_color_transform_as.c swfdec/swfdec_file_loader.c
Benjamin Otte
company at kemper.freedesktop.org
Tue Jul 22 10:20:46 PDT 2008
swfdec/swfdec_as_context.c | 3 +++
swfdec/swfdec_color_transform_as.c | 1 +
swfdec/swfdec_file_loader.c | 6 ++++++
3 files changed, 10 insertions(+)
New commits:
commit 11aa51d2137ff9bfb39b9566860ef0cb1337bc85
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Jul 22 12:47:20 2008 +0100
Change how we treat query strings when loading file URLs
Mirror behavior of current Flash players, Not those from last month.
diff --git a/swfdec/swfdec_file_loader.c b/swfdec/swfdec_file_loader.c
index c3d4819..2486d84 100644
--- a/swfdec/swfdec_file_loader.c
+++ b/swfdec/swfdec_file_loader.c
@@ -69,11 +69,17 @@ swfdec_file_loader_load (SwfdecLoader *loader, SwfdecPlayer *player,
}
unescape = g_uri_unescape_string (swfdec_url_get_path (url), NULL);
+ /* Swfdec ignores query strings, just like Flash 9.0.124.0 and onwards.
+ * Might be a useful quirk to have though */
+#ifdef QUIRKS_MODE
if (swfdec_url_get_query (url)) {
concat = g_strconcat ("/", unescape, "?", swfdec_url_get_query (url), NULL);
} else {
concat = g_strconcat ("/", unescape, NULL);
}
+#else
+ concat = g_strconcat ("/", unescape, NULL);
+#endif
g_free (unescape);
real = g_filename_from_utf8 (concat, -1, NULL, NULL, &error);
g_free (concat);
commit 26f2649a8ee600f5a66b74c2250fc0e9f4b44830
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Jul 22 12:03:48 2008 +0100
Actually add the memory, even if the context is aborted
diff --git a/swfdec/swfdec_as_context.c b/swfdec/swfdec_as_context.c
index cdd7291..058b5b4 100644
--- a/swfdec/swfdec_as_context.c
+++ b/swfdec/swfdec_as_context.c
@@ -227,6 +227,9 @@ swfdec_as_context_use_mem (SwfdecAsContext *context, gsize bytes)
/* FIXME: Don't forget to abort on OOM */
if (!swfdec_as_context_try_use_mem (context, bytes)) {
swfdec_as_context_abort (context, "Out of memory");
+ /* add the memory anyway, as we're gonna make use of it. */
+ context->memory += bytes;
+ context->memory_since_gc += bytes;
}
}
commit 58773c3f05e0b8922339fa1a48bec1598dedae90
Author: Benjamin Otte <otte at gnome.org>
Date: Tue Jul 22 12:03:22 2008 +0100
Seems I accidently deleted the swfdec_as_context_use_mem() here
diff --git a/swfdec/swfdec_color_transform_as.c b/swfdec/swfdec_color_transform_as.c
index 416e8ba..4c098df 100644
--- a/swfdec/swfdec_color_transform_as.c
+++ b/swfdec/swfdec_color_transform_as.c
@@ -371,6 +371,7 @@ swfdec_color_transform_as_new_from_transform (SwfdecAsContext *context,
g_return_val_if_fail (transform != NULL, NULL);
size = sizeof (SwfdecColorTransformAs);
+ swfdec_as_context_use_mem (context, size);
transform_as = g_object_new (SWFDEC_TYPE_COLOR_TRANSFORM_AS, NULL);
swfdec_as_object_add (SWFDEC_AS_OBJECT (transform_as), context, size);
More information about the Swfdec-commits
mailing list