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

VLCInstance: Add a comment regarding potential string copy

parent bd285f0e
......@@ -35,6 +35,8 @@ struct Init
"-vv",
};
instance = VLC::Instance( sizeof(args) / sizeof(args[0]), args );
// Do not take the string by reference. libvlcpp is constructing the std::string
// as it calls the log callback, so the string we receive will be move constructed
instance.logSet([this](int lvl, const libvlc_log_t*, std::string msg) {
if ( Log::logLevel() != medialibrary::LogLevel::Verbose )
return;
......
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