Fixed two memory leaks found by VLD.

This commit is contained in:
LoRd_MuldeR 2014-04-20 21:25:11 +02:00
parent d0cc5d5637
commit bed4300a84
5 changed files with 14 additions and 6 deletions

View File

@ -128,6 +128,12 @@ bool AbstractSource::checkSourceProperties(unsigned int &frames)
process.waitForFinished(-1); process.waitForFinished(-1);
} }
while(!patterns.isEmpty())
{
QRegExp *pattern = patterns.takeFirst();
X264_DELETE(pattern);
}
if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS) if(bTimeout || bAborted || process.exitCode() != EXIT_SUCCESS)
{ {
if(!(bTimeout || bAborted)) if(!(bTimeout || bAborted))

View File

@ -156,6 +156,7 @@ EncodeThread::~EncodeThread(void)
X264_DELETE(m_encoder); X264_DELETE(m_encoder);
X264_DELETE(m_jobObject); X264_DELETE(m_jobObject);
X264_DELETE(m_options); X264_DELETE(m_options);
X264_DELETE(m_pipedSource);
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -26,7 +26,7 @@
#define VER_X264_MAJOR 2 #define VER_X264_MAJOR 2
#define VER_X264_MINOR 3 #define VER_X264_MINOR 3
#define VER_X264_PATCH 7 #define VER_X264_PATCH 7
#define VER_X264_BUILD 848 #define VER_X264_BUILD 849
#define VER_X264_PORTABLE_EDITION (0) #define VER_X264_PORTABLE_EDITION (0)

View File

@ -58,6 +58,7 @@
<PreprocessorDefinitions>WIN32;_DEBUG;QT_DEBUG;QT_DLL;QT_GUI_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;QT_DEBUG;QT_DLL;QT_GUI_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtTest;$(SolutionDir)tmp\uic;$(SolutionDir)etc\vld\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(QTDIR)\include;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtTest;$(SolutionDir)tmp\uic;$(SolutionDir)etc\vld\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet> <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
@ -89,8 +90,8 @@ copy /Y "$(QTDIR)\plugins\imageformats\qsvgd4.dll" "$(TargetDir)\imageformats"
copy /Y "$(QTDIR)\plugins\imageformats\qjpegd4.dll" "$(TargetDir)\imageformats" copy /Y "$(QTDIR)\plugins\imageformats\qjpegd4.dll" "$(TargetDir)\imageformats"
copy /Y "$(QTDIR)\plugins\imageformats\qtiffd4.dll" "$(TargetDir)\imageformats" copy /Y "$(QTDIR)\plugins\imageformats\qtiffd4.dll" "$(TargetDir)\imageformats"
copy /Y "$(QTDIR)\plugins\imageformats\qgifd4.dll" "$(TargetDir)\imageformats" copy /Y "$(QTDIR)\plugins\imageformats\qgifd4.dll" "$(TargetDir)\imageformats"
copy /Y "$(SolutionDir)etc\vld\bin\Win32\*.dll" "$(TargetDir)" copy /Y "$(SolutionDir)etc\vld\lib\$(Platform)\$(Configuration)\*.dll" "$(TargetDir)"
copy /Y "$(SolutionDir)etc\vld\bin\Win32\*.manifest" "$(TargetDir)" copy /Y "$(SolutionDir)etc\vld\lib\$(Platform)\$(Configuration)\*.manifest" "$(TargetDir)"
</Command> </Command>
</PostBuildEvent> </PostBuildEvent>
<PostBuildEvent> <PostBuildEvent>

View File

@ -108,9 +108,6 @@
<ClInclude Include="src\mediainfo.h"> <ClInclude Include="src\mediainfo.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="src\key_filter.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="src\main.cpp"> <ClCompile Include="src\main.cpp">
@ -343,6 +340,9 @@
<CustomBuild Include="gui\win_about.ui"> <CustomBuild Include="gui\win_about.ui">
<Filter>Dialogs</Filter> <Filter>Dialogs</Filter>
</CustomBuild> </CustomBuild>
<CustomBuild Include="src\input_filter.h">
<Filter>Header Files</Filter>
</CustomBuild>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="x264_launcher.rc"> <ResourceCompile Include="x264_launcher.rc">