applemedia: fix release of null pointer

This commit is contained in:
Andoni Morales Alastruey 2013-06-18 13:33:14 +02:00
parent eecc951070
commit bab2bf3f11

View file

@ -169,8 +169,10 @@ gst_vtdec_change_state (GstElement * element, GstStateChange transition)
if (transition == GST_STATE_CHANGE_READY_TO_NULL) {
gst_vtdec_destroy_session (self, &self->session);
CFRelease (self->fmt_desc);
self->fmt_desc = NULL;
if (self->fmt_desc != NULL) {
CFRelease (self->fmt_desc);
self->fmt_desc = NULL;
}
gst_video_info_init (&self->vinfo);