Index: src/msdscap-mingw.cc
===================================================================
--- src/msdscap-mingw.cc	(revision 1263)
+++ src/msdscap-mingw.cc	(revision 1310)
@@ -711,5 +711,5 @@
 static int find_best_format(ComPtr<IAMStreamConfig> streamConfig, int count, MSVideoSize *requested_size, MSPixFmt requested_fmt ){
 	int i;
-	MSVideoSize best_found={32768,32768};
+	MSVideoSize best_found={0,0};
 	int best_index=-1;
 	char fccstr[5];
@@ -733,5 +733,5 @@
 				cur.height=infoHeader->bmiHeader.biHeight;
 				if (ms_video_size_greater_than(*requested_size,cur)){
-					if (ms_video_size_greater_than(best_found,cur)){
+					if (ms_video_size_greater_than(cur,best_found)){
 						best_found=cur;
 						best_index=i;
@@ -740,5 +740,5 @@
 				}
 			}
-		};
+		}
 		if ( mediaType->cbFormat != 0 )
 			CoTaskMemFree( (PVOID)mediaType->pbFormat );
