diff --git a/src/plugins/publish/totem-publish.c b/src/plugins/publish/totem-publish.c
index 3f36c22..eeb881b 100644
--- a/src/plugins/publish/totem-publish.c
+++ b/src/plugins/publish/totem-publish.c
@@ -264,8 +264,10 @@ totem_publish_plugin_media_cb (EpcPublisher *publisher,
 	g_object_unref (file);
 
 	if (stream) {
-		EpcContents *output = epc_contents_stream_new (NULL, totem_publish_plugin_stream_cb, stream, NULL);
-		g_object_unref (stream);
+		EpcContents *output = epc_contents_stream_new (
+			NULL, totem_publish_plugin_stream_cb,
+			stream, g_object_unref);
+
 		return output;
 	}
 
