Index: tests/phpunit/tests/media.php
===================================================================
--- tests/phpunit/tests/media.php	(revision 30341)
+++ tests/phpunit/tests/media.php	(working copy)
@@ -443,4 +443,13 @@
 		$this->assertTrue( has_image_size( 'test-size' ) );
 	}
 
+	function test_wp_check_filetype() {
+		$url = 'http://example.com/testFile.mp4?autoplay=true&otherstuff=false';
+		$filetype = wp_check_filetype( $url );
+		$expected = array(
+				'ext'  => 'mp4',
+				'type' => 'video/mp4'
+			);
+		$this->assertEquals( $expected, $filetype );
+	}
 }
Index: src/wp-includes/functions.php
===================================================================
--- src/wp-includes/functions.php	(revision 30342)
+++ src/wp-includes/functions.php	(working copy)
@@ -2049,7 +2049,7 @@
 	$ext = false;
 
 	foreach ( $mimes as $ext_preg => $mime_match ) {
-		$ext_preg = '!\.(' . $ext_preg . ')$!i';
+		$ext_preg = '!\.(' . $ext_preg . ')(\?.*)?$!i';
 		if ( preg_match( $ext_preg, $filename, $ext_matches ) ) {
 			$type = $mime_match;
 			$ext = $ext_matches[1];
