Commit b65fd307 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

VLCMedia: Fix "copy ctor"

parent 28c4f283
......@@ -30,21 +30,25 @@
using namespace LibVLCpp;
Media::Media( LibVLCpp::Instance* instance, const QString& filename ) :
m_fileName( filename ),
m_tracks( NULL )
Media::Media( LibVLCpp::Instance* instance, const QString& filename )
: m_fileName( filename )
, m_tracks( NULL )
, m_nbTracks( 0 )
{
m_internalPtr = libvlc_media_new_location( *instance, filename.toLocal8Bit() );
}
Media::Media( LibVLCpp::Media &media )
: m_tracks( NULL )
, m_nbTracks( 0 )
{
m_internalPtr = libvlc_media_duplicate( media );
}
Media::~Media()
{
if ( m_tracks )
if ( m_tracks != NULL )
libvlc_media_tracks_release( m_tracks, m_nbTracks );
libvlc_media_release( m_internalPtr );
}
......
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