Commit b6e8d038 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Removed junk code, fixed memory leaks

parent 725ad563
......@@ -33,27 +33,11 @@ Media::Media( const QString& filename )
CheckVlcppException(m_ex);
}
Media::Media( const Media& media ) : Internal<libvlc_media_t>()
{
clone( media );
}
Media::Media( const Media* media )
{
clone( *media );
}
Media::~Media()
{
libvlc_media_release( m_internalPtr );
}
void Media::clone( const Media& toClone )
{
m_pixelBuffer = NULL;
m_internalPtr = libvlc_media_duplicate( toClone.m_internalPtr );
}
void Media::addOption( const char* opt )
{
libvlc_media_add_option_flag( m_internalPtr, opt, libvlc_media_option_trusted, m_ex);
......
......@@ -41,8 +41,6 @@ namespace LibVLCpp
typedef void (*unlockCallback)( void* dataCtx );
Media( const QString& filename );
Media( const Media* media );
Media( const Media& media );
~Media();
void addOption( const char* opt );
void setLockCallback( Media::lockCallback );
......@@ -54,7 +52,6 @@ namespace LibVLCpp
uchar* getPixelBuffer();
private:
void clone( const Media& toClone );
private:
......
......@@ -66,6 +66,9 @@ MainWindow::~MainWindow()
if ( m_renderer )
delete m_renderer;
MetaDataManager::destroyInstance();
LibVLCpp::Instance::kill();
UndoStack::destroyInstance();
UndoStack::destroyInstance();
}
void MainWindow::changeEvent( QEvent *e )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment