Commit 161ddf16 authored by Alexandre Fernandez's avatar Alexandre Fernandez Committed by Hugo Beauzée-Luyssen
Browse files

MetadataParser: Rename track variable hiding transaction in loop scope


Signed-off-by: Hugo Beauzée-Luyssen's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent e325a4a9
...@@ -98,21 +98,21 @@ parser::Task::Status MetadataParser::run( parser::Task& task ) ...@@ -98,21 +98,21 @@ parser::Task::Status MetadataParser::run( parser::Task& task )
using TracksT = decltype( tracks ); using TracksT = decltype( tracks );
sqlite::Tools::withRetries( 3, [this, &isAudio, &task]( TracksT tracks ) { sqlite::Tools::withRetries( 3, [this, &isAudio, &task]( TracksT tracks ) {
auto t = m_ml->getConn()->newTransaction(); auto t = m_ml->getConn()->newTransaction();
for ( const auto& t : tracks ) for ( const auto& track : tracks )
{ {
auto codec = t.codec(); auto codec = track.codec();
std::string fcc( reinterpret_cast<const char*>( &codec ), 4 ); std::string fcc( reinterpret_cast<const char*>( &codec ), 4 );
if ( t.type() == VLC::MediaTrack::Type::Video ) if ( track.type() == VLC::MediaTrack::Type::Video )
{ {
task.media->addVideoTrack( fcc, t.width(), t.height(), task.media->addVideoTrack( fcc, track.width(), track.height(),
static_cast<float>( t.fpsNum() ) / static_cast<float>( t.fpsDen() ), static_cast<float>( track.fpsNum() ) / static_cast<float>( track.fpsDen() ),
t.language(), t.description() ); track.language(), track.description() );
isAudio = false; isAudio = false;
} }
else if ( t.type() == VLC::MediaTrack::Type::Audio ) else if ( track.type() == VLC::MediaTrack::Type::Audio )
{ {
task.media->addAudioTrack( fcc, t.bitrate(), t.rate(), t.channels(), task.media->addAudioTrack( fcc, track.bitrate(), track.rate(), track.channels(),
t.language(), t.description() ); track.language(), track.description() );
} }
} }
task.media->setDuration( task.vlcMedia.duration() ); task.media->setDuration( task.vlcMedia.duration() );
......
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