We might not have reached PAUSED yet because of an async error,
but nonetheless we want to make sure that the pads are always
deactivated in READY state.
GST_DEBUG_OBJECT (element, "clearing all cached messages");
bin_remove_messages (bin, NULL, GST_MESSAGE_ANY);
GST_OBJECT_UNLOCK (bin);
- if (current == GST_STATE_PAUSED)
- if (!(gst_bin_src_pads_activate (bin, FALSE)))
- goto activate_failure;
+ /* We might not have reached PAUSED yet due to async errors,
+ * make sure to always deactivate the pads nonetheless */
+ if (!(gst_bin_src_pads_activate (bin, FALSE)))
+ goto activate_failure;
break;
case GST_STATE_NULL:
if (current == GST_STATE_READY) {