srtpdec: Only clear streams if they have been created

This commit is contained in:
Olivier Crête 2014-05-01 19:16:35 -04:00
parent 494b8e110d
commit 775e998dab

View file

@ -1091,11 +1091,11 @@ gst_srtp_dec_change_state (GstElement * element, GstStateChange transition)
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
gst_srtp_dec_clear_streams (filter);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
g_hash_table_unref (filter->streams);
filter->streams = NULL;
break;
case GST_STATE_CHANGE_READY_TO_NULL:
break;
default:
break;
}