[vlc-commits] medialib: Assert on invalid file type when adding external mrl
Hugo Beauzée-Luyssen
git at videolan.org
Wed Jul 18 17:08:06 CEST 2018
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Jul 18 15:43:53 2018 +0200| [641f20802d477c22b0ded524a327d1e1b41961eb] | committer: Hugo Beauzée-Luyssen
medialib: Assert on invalid file type when adding external mrl
All expected values (vlc_ml_file_type_t) are explicitely handled by the
switch
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=641f20802d477c22b0ded524a327d1e1b41961eb
---
modules/misc/medialibrary/medialib.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/misc/medialibrary/medialib.cpp b/modules/misc/medialibrary/medialib.cpp
index b455424afa..e8390892bd 100644
--- a/modules/misc/medialibrary/medialib.cpp
+++ b/modules/misc/medialibrary/medialib.cpp
@@ -810,6 +810,8 @@ int MediaLibrary::controlMedia( int query, va_list args )
case VLC_ML_FILE_TYPE_SUBTITLE:
mlType = medialibrary::IFile::Type::Subtitles;
break;
+ default:
+ vlc_assert_unreachable();
}
if ( m->addExternalMrl( mrl, mlType ) == nullptr )
return VLC_EGENERIC;
More information about the vlc-commits
mailing list