[Swfdec-commits] src/plugin.c src/swfmoz_loader.c
Benjamin Otte
company at kemper.freedesktop.org
Sun Jan 27 02:03:29 PST 2008
src/plugin.c | 3 +--
src/swfmoz_loader.c | 3 ++-
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit cf6d12e0246cabe7ac8fb2ec71231c68967b0c0c
Author: Benjamin Otte <otte at gnome.org>
Date: Sun Jan 27 11:03:16 2008 +0100
fix messed up SwfmozLoader refcounting (fixes #14257)
diff --git a/src/plugin.c b/src/plugin.c
index 0fee553..9bf3240 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -376,11 +376,10 @@ plugin_url_notify (NPP instance, const char* url, NPReason reason, void* notifyD
if (reason == NPRES_NETWORK_ERR) {
swfdec_stream_error (stream, "Network error");
- g_object_unref (stream);
} else if (reason == NPRES_USER_BREAK) {
swfdec_stream_error (stream, "User interrupt");
- g_object_unref (stream);
}
+ g_object_unref (stream);
}
NPError
diff --git a/src/swfmoz_loader.c b/src/swfmoz_loader.c
index 02dee26..bff8672 100644
--- a/src/swfmoz_loader.c
+++ b/src/swfmoz_loader.c
@@ -55,11 +55,11 @@ swfmoz_loader_load (SwfdecLoader *loader, SwfdecPlayer *player,
SwfmozLoader *moz = SWFMOZ_LOADER (loader);
moz->instance = mozplay->instance;
- g_object_ref (moz);
if (mozplay->initial) {
swfmoz_loader_set_stream (moz, mozplay->initial);
mozplay->initial = NULL;
} else {
+ g_object_ref (moz);
if (request == SWFDEC_LOADER_REQUEST_POST) {
if (buffer) {
plugin_post_url_notify (moz->instance, url, NULL,
@@ -109,6 +109,7 @@ swfmoz_loader_set_stream (SwfmozLoader *loader, NPStream *stream)
g_return_if_fail (stream != NULL);
g_printerr ("Loading stream: %s\n", stream->url);
+ g_object_ref (loader);
stream->pdata = loader;
loader->stream = stream;
if (stream->end)
More information about the Swfdec-commits
mailing list