diff --git a/aegisub/audio_provider_ffmpegsource.cpp b/aegisub/audio_provider_ffmpegsource.cpp
index 70951c269901a519167f95f18c3e8dbcc2e5ca12..9049c95a9db7d266ac4cf9031a00c947d54f7b66 100644
--- a/aegisub/audio_provider_ffmpegsource.cpp
+++ b/aegisub/audio_provider_ffmpegsource.cpp
@@ -77,7 +77,7 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) {
 	if (Index == NULL) {
 		// index didn't exist or was invalid, we'll have to (re)create it
 		try {
-			Index = DoIndexing(Index, FileNameWX, CacheName, FFMSTrackMaskAll);
+			Index = DoIndexing(Index, FileNameWX, CacheName, FFMSTrackMaskAll, false);
 		} catch (wxString temp) {
 			MsgString << temp;
 			throw MsgString;
@@ -102,7 +102,7 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) {
 			if (FFMS_GetNumFrames(FrameData, FFMSErrMsg, MsgSize) <= 0 && (FFMS_GetTrackType(FrameData, FFMSErrMsg, MsgSize) == FFMS_TYPE_AUDIO)) {
 				// found an unindexed audio track, we'll need to reindex
 				try {
-					Index = DoIndexing(Index, FileNameWX, CacheName, FFMSTrackMaskAll);
+					Index = DoIndexing(Index, FileNameWX, CacheName, FFMSTrackMaskAll, false);
 				} catch (wxString temp) {
 					MsgString << temp;
 					throw MsgString;
@@ -117,7 +117,14 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) {
 	}
 
 	// FIXME: provide a way to choose which audio track to load?
-	AudioSource = FFMS_CreateAudioSource(FileNameWX.char_str(), FFMSFirstSuitableTrack, Index, FFMSErrMsg, MsgSize);
+	int TrackNumber = FFMS_GetFirstTrackOfType(Index, FFMS_TYPE_AUDIO, FFMSErrMsg, MsgSize);
+	if (TrackNumber < 0) {
+		wxString temp(FFMSErrMsg, wxConvUTF8);
+		MsgString << _T("couldn't find any audio tracks: ") << temp;
+		throw MsgString;
+	}
+
+	AudioSource = FFMS_CreateAudioSource(FileNameWX.char_str(), TrackNumber, Index, FFMSErrMsg, MsgSize);
 	if (!AudioSource) {
 			wxString temp(FFMSErrMsg, wxConvUTF8);
 			MsgString << _T("failed to open audio track: ") << temp;
diff --git a/aegisub/ffmpegsource_common.cpp b/aegisub/ffmpegsource_common.cpp
index dc7aa7fce79a5acd8444fe14b59a55d1cb92cb13..8b94106af11997d4c1b2ab71ff3c7190462ff816 100644
--- a/aegisub/ffmpegsource_common.cpp
+++ b/aegisub/ffmpegsource_common.cpp
@@ -56,7 +56,7 @@ int __stdcall FFmpegSourceProvider::UpdateIndexingProgress(int State, int64_t Cu
 
 ///////////
 // Do indexing
-FrameIndex *FFmpegSourceProvider::DoIndexing(FrameIndex *Index, wxString FileNameWX, wxString CacheName, int Trackmask) {
+FrameIndex *FFmpegSourceProvider::DoIndexing(FrameIndex *Index, wxString FileNameWX, wxString CacheName, int Trackmask, bool IgnoreDecodeErrors) {
 	char FFMSErrMsg[1024];
 	unsigned MsgSize = sizeof(FFMSErrMsg);
 	wxString MsgString;
@@ -69,7 +69,7 @@ FrameIndex *FFmpegSourceProvider::DoIndexing(FrameIndex *Index, wxString FileNam
 	Progress.ProgressDialog->SetProgress(0,1);
 
 	// index all audio tracks
-	Index = FFMS_MakeIndex(FileNameWX.char_str(), Trackmask, FFMSTrackMaskNone, NULL, FFmpegSourceProvider::UpdateIndexingProgress, &Progress, FFMSErrMsg, MsgSize);
+	Index = FFMS_MakeIndex(FileNameWX.char_str(), Trackmask, FFMSTrackMaskNone, NULL, IgnoreDecodeErrors, FFmpegSourceProvider::UpdateIndexingProgress, &Progress, FFMSErrMsg, MsgSize);
 	if (!Index) {
 		Progress.ProgressDialog->Destroy();
 		wxString temp(FFMSErrMsg, wxConvUTF8);
diff --git a/aegisub/ffmpegsource_common.h b/aegisub/ffmpegsource_common.h
index d5695f4d4b95d20147e145baaee05ed73a5cc976..62de9d0ae4782caff84e4fa41f48192627048f8a 100644
--- a/aegisub/ffmpegsource_common.h
+++ b/aegisub/ffmpegsource_common.h
@@ -47,7 +47,6 @@ class FFmpegSourceProvider {
 public:
 	static const int FFMSTrackMaskAll		= -1;
 	static const int FFMSTrackMaskNone		= 0;
-	static const int FFMSFirstSuitableTrack	= -1;
 
 	struct IndexingProgressDialog {
 		volatile bool IndexingCanceled;
@@ -55,7 +54,7 @@ public:
 	};
 
 	static int __stdcall UpdateIndexingProgress(int State, int64_t Current, int64_t Total, void *Private);
-	FrameIndex *DoIndexing(FrameIndex *Index, wxString Filename, wxString Cachename, int Trackmask);
+	FrameIndex *DoIndexing(FrameIndex *Index, wxString Filename, wxString Cachename, int Trackmask, bool IgnoreDecodeErrors);
 };
 
 #endif /* WITH_FFMPEGSOURCE */
\ No newline at end of file
diff --git a/aegisub/setup.cpp b/aegisub/setup.cpp
index e87225661248082b54b6ba3386ac4cf8442b0b88..e5942e8c2f81fb99d4f1757c54a1986550862228 100644
--- a/aegisub/setup.cpp
+++ b/aegisub/setup.cpp
@@ -126,7 +126,7 @@
 ////////////////
 // FFMpegSource
 #ifdef WITH_FFMPEGSOURCE
-#pragma comment(lib, "ffmpegsource2.lib")
+#pragma comment(lib, "ffms2.lib")
 #endif
 
 
diff --git a/aegisub/video_provider_ffmpegsource.cpp b/aegisub/video_provider_ffmpegsource.cpp
index 42cf64408e751a5f55e8fa2409579a1d8b315b04..0a9f23cf4a24b3ec470ffb1bdce8ffa262417947 100644
--- a/aegisub/video_provider_ffmpegsource.cpp
+++ b/aegisub/video_provider_ffmpegsource.cpp
@@ -90,7 +90,8 @@ void FFmpegSourceVideoProvider::LoadVideo(Aegisub::String filename, double fps)
 	if (Index == NULL) {
 		// index didn't exist or was invalid, we'll have to (re)create it
 		try {
-			Index = DoIndexing(Index, FileNameWX, CacheName, FFMSTrackMaskAll);
+			// ignore audio decoding errors here, we don't care right now
+			Index = DoIndexing(Index, FileNameWX, CacheName, FFMSTrackMaskAll, true);
 		} catch (wxString temp) {
 			ErrorMsg << temp;
 			throw ErrorMsg;
@@ -112,7 +113,15 @@ void FFmpegSourceVideoProvider::LoadVideo(Aegisub::String filename, double fps)
 	else 
 		SeekMode = 1;
 
-	VideoSource = FFMS_CreateVideoSource(FileNameWX.char_str(), FFMSFirstSuitableTrack, Index, "", Threads, SeekMode, FFMSErrorMessage, MessageSize);
+	// FIXME: provide a way to choose which audio track to load?
+	int TrackNumber = FFMS_GetFirstTrackOfType(Index, FFMS_TYPE_VIDEO, FFMSErrorMessage, MessageSize);
+	if (TrackNumber < 0) {
+		wxString temp(FFMSErrorMessage, wxConvUTF8);
+		ErrorMsg << _T("couldn't find any video tracks: ") << temp;
+		throw ErrorMsg;
+	}
+
+	VideoSource = FFMS_CreateVideoSource(FileNameWX.char_str(), TrackNumber, Index, "", Threads, SeekMode, FFMSErrorMessage, MessageSize);
 	if (VideoSource == NULL) {
 		wxString temp(FFMSErrorMessage, wxConvUTF8);
 		ErrorMsg << _T("failed to open video track: ") << temp;