[vlmc-devel] VLCMedia: Fix "copy ctor"
Hugo Beauzée-Luyssen
git at videolan.org
Mon Feb 24 20:09:41 CET 2014
vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Feb 24 15:25:56 2014 +0200| [b65fd307817bbea661a14a2349fe3c2b789be6f7] | committer: Hugo Beauzée-Luyssen
VLCMedia: Fix "copy ctor"
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=b65fd307817bbea661a14a2349fe3c2b789be6f7
---
src/Backend/VLC/LibVLCpp/VLCMedia.cpp | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/Backend/VLC/LibVLCpp/VLCMedia.cpp b/src/Backend/VLC/LibVLCpp/VLCMedia.cpp
index 66cca1b..da575a0 100644
--- a/src/Backend/VLC/LibVLCpp/VLCMedia.cpp
+++ b/src/Backend/VLC/LibVLCpp/VLCMedia.cpp
@@ -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 );
}
More information about the Vlmc-devel
mailing list