Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/animations/gtk/gtk_dotted_slider_widget.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ static gboolean gtk_dotted_slider_refresh_items_gui(void * user_data){

void gtk_dotted_slider_refresh_items(GtkDottedSlider *slider){
C_TRAIL("gtk_dotted_slider_refresh_items");
g_idle_add(gtk_dotted_slider_refresh_items_gui,slider);
//g_idle_add(gtk_dotted_slider_refresh_items_gui,slider);
}

void
gtk_dotted_slider_set_item_count (GtkDottedSlider *revealer,
gint value)
gint value)
{
C_TRAIL("gtk_dotted_slider_set_item_count");
GtkDottedSliderPrivate *priv = gtk_dotted_slider_get_instance_private (revealer);
Expand Down
4 changes: 2 additions & 2 deletions src/app/onvif_app_shutdown.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ void * _thread_destruction(void * event){
OnvifApp__destroy(app);

//Quitting from idle thread allows the windows and OnvifMgrDeviceRow (and nested OnvifDevice) to destroy properly
//Using LOW priority to allow other event to run first.
g_idle_add_full (G_PRIORITY_LOW, G_SOURCE_FUNC(safely_quit_gtk_main), NULL, NULL);
//Using HIGH priority to ensure gtk_main_quit runs before any widget operations that might access destroyed widgets
g_idle_add_full (G_PRIORITY_HIGH, G_SOURCE_FUNC(safely_quit_gtk_main), NULL, NULL);

pthread_exit(0);
}
Expand Down
17 changes: 15 additions & 2 deletions src/gst/gstrtspplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1311,8 +1311,21 @@ GstRtspPlayer__dispose (GObject *gobject)
P_MUTEX_CLEANUP(priv->player_lock);
//A bug seems to have been introduced where the widget is destroyed while cleaning up gtkglsink and not removed from gtk hierarchy.
//Removing the widget before destroying gtkglsink seems to be a viable retrocompatible solution without causing leaks in other version
gtk_container_remove (GTK_CONTAINER (priv->canvas_handle), GTK_WIDGET(priv->canvas));
g_object_unref(priv->canvas);

if (priv->canvas) {
if (priv->canvas_handle && GTK_IS_CONTAINER(priv->canvas_handle) && GTK_IS_WIDGET(priv->canvas)) {
// Additional safety: check parent relationship safely
GtkWidget *parent = gtk_widget_get_parent(GTK_WIDGET(priv->canvas));
if (parent && GTK_IS_WIDGET(parent) && parent == GTK_WIDGET(priv->canvas_handle)) {
gtk_container_remove (GTK_CONTAINER (priv->canvas_handle), GTK_WIDGET(priv->canvas));
}
}
// Only unref if canvas is still a valid GObject
if (G_IS_OBJECT(priv->canvas)) {
g_object_unref(priv->canvas);
}
priv->canvas = NULL;
}

if(priv->video_bin){
g_object_unref(priv->video_bin);
Expand Down