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

Metadata: Release all meta obtained from VLC

parent d26fc300
......@@ -137,7 +137,9 @@ void VLCMetadataService::parseAudioFile( VLCMetadataService::Context* ctx )
{
title = trackTitle;
}
free( trackTitle );
unsigned int trackNb = atoi( trackNbStr );
free( trackNbStr );
auto track = album->addTrack( title, trackNb );
if ( track == nullptr )
{
......
......@@ -54,6 +54,7 @@ class VLCMetadataServices : public testing::Test
auto vlcService = new VLCMetadataService( vlcInstance );
vlcService->initialize( cb.get(), ml.get() );
// This takes ownership of vlcService
ml->addMetadataService( vlcService );
bool res = ml->initialize( "test.db" );
ASSERT_TRUE( res );
......
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