[vlmc-devel] MLTBackend: Simplify properties cleanup

Hugo Beauzée-Luyssen git at videolan.org
Wed Jul 6 11:50:03 CEST 2016


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Jul  5 14:38:16 2016 +0200| [a157b55c6cb21145987f69c23b984031ffc53afc] | committer: Hugo Beauzée-Luyssen

MLTBackend: Simplify properties cleanup

> https://code.videolan.org/videolan/vlmc/commit/a157b55c6cb21145987f69c23b984031ffc53afc
---

 src/Backend/MLT/MLTBackend.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/Backend/MLT/MLTBackend.cpp b/src/Backend/MLT/MLTBackend.cpp
index cccfe88..3d39930 100644
--- a/src/Backend/MLT/MLTBackend.cpp
+++ b/src/Backend/MLT/MLTBackend.cpp
@@ -56,17 +56,15 @@ MLTBackend::MLTBackend()
 
     for ( int i = 0; i < m_mltRepo->filters()->count(); ++i )
     {
-        auto pro = m_mltRepo->metadata( filter_type, m_mltRepo->filters()->get_name( i ) );
+        auto pro = std::unique_ptr<Mlt::Properties>( m_mltRepo->metadata( filter_type, m_mltRepo->filters()->get_name( i ) ) );
         auto filterInfo = new MLTFilterInfo;
-        filterInfo->setProperties( pro );
+        filterInfo->setProperties( pro.get() );
         if ( filterInfo->identifier().empty() == true )
         {
             delete filterInfo;
-            delete pro;
             continue;
         }
         m_availableFilters[ filterInfo->identifier() ] = filterInfo;
-        delete pro;
     }
 }
 



More information about the Vlmc-devel mailing list