mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
mimdec: Lock element before unlocking
This commit is contained in:
parent
22b95ab4cd
commit
e8c8725efe
1 changed files with 2 additions and 1 deletions
|
@ -333,6 +333,7 @@ gst_mimdec_change_state (GstElement * element, GstStateChange transition)
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
|
GST_OBJECT_LOCK (element);
|
||||||
if (mimdec->dec != NULL) {
|
if (mimdec->dec != NULL) {
|
||||||
mimic_close (mimdec->dec);
|
mimic_close (mimdec->dec);
|
||||||
mimdec->dec = NULL;
|
mimdec->dec = NULL;
|
||||||
|
@ -340,8 +341,8 @@ gst_mimdec_change_state (GstElement * element, GstStateChange transition)
|
||||||
mimdec->have_header = FALSE;
|
mimdec->have_header = FALSE;
|
||||||
mimdec->payload_size = -1;
|
mimdec->payload_size = -1;
|
||||||
mimdec->current_ts = -1;
|
mimdec->current_ts = -1;
|
||||||
GST_OBJECT_UNLOCK (element);
|
|
||||||
}
|
}
|
||||||
|
GST_OBJECT_UNLOCK (element);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
GST_OBJECT_LOCK (element);
|
GST_OBJECT_LOCK (element);
|
||||||
|
|
Loading…
Reference in a new issue