summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <jasuarez@igalia.com>2010-03-15 12:32:40 +0100
committerJuan A. Suarez Romero <jasuarez@igalia.com>2010-03-15 12:32:40 +0100
commitc1fd98b54e1ddbce0c924922a43e2d083b2ccbc5 (patch)
tree1e858abedf0516777baa56054197bcdcec86ae6f
parentac7af0ab66e0a28ec2431a2b6abc0f1934cf2642 (diff)
downloadgrilo-c1fd98b54e1ddbce0c924922a43e2d083b2ccbc5.tar.gz
[core] Increase media refcount in metadata()
Even in the case of creating a new media, increase its refcount. User is in charge of unref it if the media is of non interest for him.
-rw-r--r--src/grl-media-source.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/grl-media-source.c b/src/grl-media-source.c
index a86c623..a4e7332 100644
--- a/src/grl-media-source.c
+++ b/src/grl-media-source.c
@@ -1567,8 +1567,9 @@ grl_media_source_metadata (GrlMediaSource *source,
ms->media = grl_media_box_new ();
grl_media_set_id (ms->media, NULL);
} else {
- ms->media = g_object_ref (media);
+ ms->media = media;
}
+ g_object_ref (ms->media);
/* Save a reference to the operaton spec in the relay-cb's
user_data so that we can free the spec there */