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:
Matthew Waters 2015-04-24 17:13:10 +10:00
parent 6c8eeb448d
commit b216629941

View file

@ -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;
} }