Commit 6617273b authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

MetadataParser: Guess media type in a case insensitive way



Refs vlc-ios#906

(cherry picked from commit 6cf3412f7fe4b19f2f5175224b9fe67be5662caa)
Signed-off-by: Hugo Beauzée-Luyssen's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
(cherry picked from commit b2351a2d

)
Signed-off-by: Hugo Beauzée-Luyssen's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent e98ead81
......@@ -507,6 +507,8 @@ bool MetadataAnalyzer::parseVideoFile( IItem& item ) const
IMedia::Type MetadataAnalyzer::guessMediaType( const IItem &item ) const
{
auto ext = utils::file::extension( item.mrl() );
std::transform(cbegin( ext ), cend( ext ), begin( ext ),
[](unsigned char c){ return tolower(c); } );
if ( ext == "vob" || ext == "ts" || ext == "ogv" || ext == "mpg" ||
ext == "ogm" || ext == "m2ts" || ext == "m2v" || ext == "mpeg" ||
ext == "xvid" || ext == "ogx" )
......
Supports Markdown
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