Skip to content
Snippets Groups Projects
Commit 2ad5036d authored by Rafaël Carré's avatar Rafaël Carré
Browse files

* #6326 : do not destroy clutter resources

fix clutter rendering crash on second initialization
fix video_preview_run prototype (no return value)
parent 07413045
No related branches found
No related tags found
No related merge requests found
......@@ -475,7 +475,7 @@ on_stage_delete(ClutterStage *stage, ClutterEvent *event, gpointer data)
}
int
void
video_preview_run(VideoPreview *preview)
{
VideoPreviewPrivate * priv = VIDEO_PREVIEW_GET_PRIVATE(preview);
......@@ -516,8 +516,6 @@ video_preview_run(VideoPreview *preview)
g_object_notify_by_pspec (G_OBJECT(preview), properties[PROP_RUNNING]);
g_object_get(G_OBJECT(preview), "drawarea", &priv->drawarea, NULL);
return 0;
}
void
......@@ -526,14 +524,6 @@ video_preview_stop(VideoPreview *preview)
VideoPreviewPrivate *priv = VIDEO_PREVIEW_GET_PRIVATE(preview);
g_idle_remove_by_data((void*)preview);
priv->is_running = FALSE;
if (priv->using_clutter) {
/* Destroy stage, which is texture's parent */
if (priv->texture && CLUTTER_IS_ACTOR(priv->texture)) {
ClutterActor *stage = clutter_actor_get_parent(priv->texture);
clutter_actor_destroy(stage);
}
} else {
if (priv->cairo)
if (!priv->using_clutter && priv->cairo)
cairo_destroy(priv->cairo);
}
}
......@@ -62,7 +62,7 @@ struct _VideoPreviewClass {
/* Public interface */
VideoPreview *video_preview_new(GtkWidget *drawarea, int width, int height, const char *format, int shmkey, int semkey, int vbsize);
int video_preview_run(VideoPreview *preview);
void video_preview_run(VideoPreview *preview);
void video_preview_stop(VideoPreview *preview);
G_END_DECLS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment