Index: wp-includes/template-loader.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/template-loader.php	(revision 2d136ce42167cac650c9394b71d83a86c88e6112)
+++ wp-includes/template-loader.php	(revision )
@@ -39,25 +39,12 @@
 elseif ( is_trackback() ) :
 	include( ABSPATH . 'wp-trackback.php' );
 	return;
-elseif ( is_embed() ) :
-	$template = ABSPATH . WPINC . '/embed-template.php';
-
-	/**
-	 * Filter the template used for embedded posts.
-	 *
-	 * @since 4.4.0
-	 *
-	 * @param string $template Path to the template file.
-	 */
-	$template = apply_filters( 'embed_template', $template );
-
-	include ( $template );
-	return;
 endif;
 
 if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) :
 	$template = false;
-	if     ( is_404()            && $template = get_404_template()            ) :
+	if     ( is_embed()          && $template = get_embed_template()          ) :
+	elseif ( is_404()            && $template = get_404_template()            ) :
 	elseif ( is_search()         && $template = get_search_template()         ) :
 	elseif ( is_front_page()     && $template = get_front_page_template()     ) :
 	elseif ( is_home()           && $template = get_home_template()           ) :
Index: wp-includes/template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/template.php	(revision 2d136ce42167cac650c9394b71d83a86c88e6112)
+++ wp-includes/template.php	(revision )
@@ -405,6 +405,40 @@
 }
 
 /**
+ * Retrieve path of embed template in current or parent template.
+ * By default the WordPress-template is returned.
+ *
+ * The template path is filterable via the dynamic {@see '$type_template'} hook,
+ * e.g. 'embed_template'.
+ *
+ * @since 4.5.0
+ *
+ * @see get_query_template()
+ *
+ * @return string Full path to embed template file.
+ */
+function get_embed_template() {
+
+	$object     = get_queried_object();
+	$templates  = array();
+	if ( ! empty( $object->post_type ) ) {
+		$templates[] = "embed-{$object->post_type}-{$object->post_name}.php";
+		$templates[] = "embed-{$object->post_type}.php";
+	}
+
+	$templates[] = "embed.php";
+
+	$template = get_query_template( 'embed', $templates );
+
+	// Fallback to default WordPress-template.
+	if ( $template === '' ) {
+		$template = ABSPATH . WPINC . '/embed-template.php';
+	}
+
+	return $template;
+}
+
+/**
  * Retrieves the path of the singular template in current or parent template.
  *
  * The template path is filterable via the dynamic {@see '$type_template'} hook,
