Merge r3294 (ffms2 using utf8 cache filenames) into the 2.1.8 branch. Updates #955.

Originally committed to SVN as r3298.
This commit is contained in:
Karl Blomster 2009-07-27 21:49:53 +00:00
parent 04ce442f8c
commit 1f81078d75
4 changed files with 9 additions and 3 deletions

View File

@ -142,7 +142,9 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) {
} }
// update access time of index file so it won't get cleaned away // update access time of index file so it won't get cleaned away
wxFileName(CacheName).Touch(); if (!wxFileName(CacheName).Touch()) {
// warn user?
}
// FIXME: provide a way to choose which audio track to load? // FIXME: provide a way to choose which audio track to load?
int TrackNumber = FFMS_GetFirstTrackOfType(Index, FFMS_TYPE_AUDIO, FFMSErrMsg, MsgSize); int TrackNumber = FFMS_GetFirstTrackOfType(Index, FFMS_TYPE_AUDIO, FFMSErrMsg, MsgSize);

View File

@ -95,7 +95,7 @@ FFIndex *FFmpegSourceProvider::DoIndexing(FFIndex *Index, wxString FileNameWX, w
// write index to disk for later use // write index to disk for later use
// ignore write errors for now // ignore write errors for now
FFMS_WriteIndex(CacheName.char_str(), Index, FFMSErrMsg, MsgSize); FFMS_WriteIndex(CacheName.utf8_str(), Index, FFMSErrMsg, MsgSize);
/*if (FFMS_WriteIndex(CacheName.char_str(), Index, FFMSErrMsg, MsgSize)) { /*if (FFMS_WriteIndex(CacheName.char_str(), Index, FFMSErrMsg, MsgSize)) {
wxString temp(FFMSErrMsg, wxConvUTF8); wxString temp(FFMSErrMsg, wxConvUTF8);
MsgString << _T("Failed to write index: ") << temp; MsgString << _T("Failed to write index: ") << temp;

View File

@ -41,6 +41,7 @@
#include <wx/wxprec.h> #include <wx/wxprec.h>
#include <wx/thread.h> #include <wx/thread.h>
#include "include/aegisub/aegisub.h" #include "include/aegisub/aegisub.h"
#define FFMS_BETA_10_COMPAT
#include <ffms.h> #include <ffms.h>
#include "dialog_progress.h" #include "dialog_progress.h"

View File

@ -137,7 +137,10 @@ void FFmpegSourceVideoProvider::LoadVideo(Aegisub::String filename, double fps)
} }
// update access time of index file so it won't get cleaned away // update access time of index file so it won't get cleaned away
wxFileName(CacheName).Touch(); if (!wxFileName(CacheName).Touch()) {
// warn user?
// FIND OUT WHY IT'S POPPING UP ERROR MESSAGES HERE
}
// we have now read the index and may proceed with cleaning the index cache // we have now read the index and may proceed with cleaning the index cache
if (!CleanCache()) { if (!CleanCache()) {