Fix a cast issue in GetCacheFilename under wx2.9.. fix by jfs, thanks!

Originally committed to SVN as r3221.
This commit is contained in:
Amar Takhar 2009-07-23 15:37:47 +00:00
parent a0370f9004
commit 0f6977fa39

View file

@ -163,10 +163,11 @@ wxString FFmpegSourceProvider::GetCacheFilename(const wxString& filename)
wxString toHash = filename + wxString::Format(_T(":%i"),len);
// Get the MD5 digest of the string
const wchar_t *tmp = toHash.wc_str();
md5_state_t state;
md5_byte_t digest[16];
md5_init(&state);
md5_append(&state,(md5_byte_t*)toHash.wc_str(),toHash.Length()*sizeof(wxChar));
md5_append(&state,(md5_byte_t*)tmp,toHash.Length()*sizeof(wchar_t));
md5_finish(&state,digest);
// Generate the filename
@ -305,4 +306,4 @@ wxThread::ExitCode FFmpegSourceCacheCleaner::Entry() {
}
#endif WITH_FFMPEGSOURCE
#endif // WITH_FFMPEGSOURCE