* Fixed a mismatched new[]/delete

* Fixed a memory leak that would occur when loading subtitles from a matroska file

Originally committed to SVN as r2924.
This commit is contained in:
harukalover 2009-05-14 18:28:57 +00:00
parent 370b986181
commit 82fca6e35f
1 changed files with 2 additions and 1 deletions

View File

@ -360,7 +360,7 @@ void MatroskaWrapper::GetSubtitles(AssFile *target) {
memcpy(privData,trackInfo->CodecPrivate,privSize);
privData[privSize] = 0;
wxString privString(privData,wxConvUTF8);
delete privData;
delete[] privData;
// Load into file
wxString group = _T("[Script Info]");
@ -416,6 +416,7 @@ void MatroskaWrapper::GetSubtitles(AssFile *target) {
fread(tmp,1,frameSize,input->fp);
tmp[frameSize] = 0;
wxString blockString(tmp,wxConvUTF8);
delete[] tmp;
// Get start and end times
//longlong timecodeScaleLow = timecodeScale / 100;