mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
glimagesink: balance change_state display ref/unref
the display was being unreffed on the incorrect state change causing invalid state when changing from PLAYING/PAUSED->READY->PAUSED/PLAYING.
This commit is contained in:
parent
6c8eeb448d
commit
b216629941
1 changed files with 3 additions and 4 deletions
|
@ -968,15 +968,14 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
gst_object_unref (glimage_sink->context);
|
gst_object_unref (glimage_sink->context);
|
||||||
glimage_sink->context = NULL;
|
glimage_sink->context = NULL;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
if (glimage_sink->display) {
|
if (glimage_sink->display) {
|
||||||
gst_object_unref (glimage_sink->display);
|
gst_object_unref (glimage_sink->display);
|
||||||
glimage_sink->display = NULL;
|
glimage_sink->display = NULL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue