File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,18 @@ std::vector<std::string> getInputExtensions()
38
38
if ( iFormat->extensions != NULL )
39
39
{
40
40
// parse extensions
41
- char * ext = const_cast <char *>( iFormat->extensions );
41
+ std::string exts = std::string ( iFormat->extensions );
42
+ char * ext = strtok ( const_cast <char *>( exts.c_str () ), " ," );
42
43
while ( ext != NULL )
43
44
{
44
45
extensions.push_back ( std::string ( ext ) );
45
46
ext = strtok ( NULL , " ," );
46
47
}
47
48
48
49
// parse name (name's format defines (in general) extensions )
49
- ext = const_cast <char *>( iFormat->name );
50
+ // don't need to do it in recent LibAV/FFMpeg versions
51
+ exts = std::string ( iFormat->name );
52
+ ext = strtok ( const_cast <char *>( exts.c_str () ), " ," );
50
53
while ( ext != NULL )
51
54
{
52
55
extensions.push_back ( std::string ( ext ) );
You can’t perform that action at this time.
0 commit comments