forked from mia/Aegisub
FFMS2 a/v providers should use UTF8 strings for the cache filenames, just like for every other file. Updates #955 but does not fix it since you still get bizarre popups that I have no idea where they're coming from if the write/touch operations fail.
This change should be merged into 2.1.8. Originally committed to SVN as r3294.
This commit is contained in:
parent
696ae74f8a
commit
f066903d98
4 changed files with 9 additions and 3 deletions
|
@ -164,7 +164,9 @@ void FFmpegSourceAudioProvider::LoadAudio(wxString filename) {
|
|||
}
|
||||
|
||||
// update access time of index file so it won't get cleaned away
|
||||
wxFileName(CacheName).Touch();
|
||||
if (!wxFileName(CacheName).Touch()) {
|
||||
// warn user?
|
||||
}
|
||||
|
||||
AudioSource = FFMS_CreateAudioSource(FileNameShort.utf8_str(), TrackNumber, Index, FFMSErrMsg, MsgSize);
|
||||
FFMS_DestroyIndex(Index);
|
||||
|
|
|
@ -96,7 +96,7 @@ FFIndex *FFmpegSourceProvider::DoIndexing(FFIndexer *Indexer, const wxString &Ca
|
|||
|
||||
// write index to disk for later use
|
||||
// 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)) {
|
||||
wxString temp(FFMSErrMsg, wxConvUTF8);
|
||||
MsgString << _T("Failed to write index: ") << temp;
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <wx/wxprec.h>
|
||||
#include <wx/thread.h>
|
||||
#include "include/aegisub/aegisub.h"
|
||||
#define FFMS_BETA_10_COMPAT
|
||||
#include <ffms.h>
|
||||
#include "dialog_progress.h"
|
||||
|
||||
|
|
|
@ -174,7 +174,10 @@ void FFmpegSourceVideoProvider::LoadVideo(wxString filename) {
|
|||
}
|
||||
|
||||
// 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
|
||||
if (!CleanCache()) {
|
||||
|
|
Loading…
Reference in a new issue