Skip to content
Commits on Source (2)
......@@ -522,7 +522,7 @@ public:
libvlc_media_discoverer_description_t** pp_descs;
auto nbSd = libvlc_media_discoverer_list_get( *this, static_cast<libvlc_media_discoverer_category_t>( category ),
&pp_descs );
if ( nbSd <= 0 )
if ( nbSd == 0 )
return {};
auto releaser = [nbSd](libvlc_media_discoverer_description_t** ptr) {
libvlc_media_discoverer_list_release( ptr, nbSd );
......@@ -530,7 +530,7 @@ public:
std::unique_ptr<libvlc_media_discoverer_description_t*, decltype(releaser)> descPtr( pp_descs, releaser );
std::vector<MediaDiscoverer::Description> res;
res.reserve( nbSd );
for ( auto i = 0; i < nbSd; ++i )
for ( auto i = 0u; i < nbSd; ++i )
res.emplace_back( pp_descs[i]->psz_name, pp_descs[i]->psz_longname, pp_descs[i]->i_cat );
return res;
}
......
......@@ -523,6 +523,7 @@ public:
return libvlc_media_get_duration(*this);
}
#if LIBVLC_VERSION_INT < LIBVLC_VERSION(3, 0, 0, 0)
/**
* Parse a media.
*
......@@ -540,7 +541,6 @@ public:
libvlc_media_parse(*this);
}
#if LIBVLC_VERSION_INT < LIBVLC_VERSION(3, 0, 0, 0)
/**
* Parse a media.
*
......