Commit 9383d042 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

MetadataParser: Ensure we have a media to analyze

(cherry picked from commit 12a45daa

)
Signed-off-by: Hugo Beauzée-Luyssen's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent fee86e9c
......@@ -99,6 +99,15 @@ parser::Task::Status MetadataParser::run( parser::Task& task )
// Synchronize file step tracker with task
task.markStepCompleted( static_cast<parser::Task::ParserStep>( task.step ) );
}
else if ( task.media == nullptr )
{
// If we have a file but no media, this is a problem, we can analyze as
// much as we want, but won't be able to store anything.
// Keep in mind that if we are in this code path, we are not analyzing
// a playlist.
assert( false );
return parser::Task::Status::Fatal;
}
const auto& tracks = task.vlcMedia.tracks();
......
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