File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/AvTranscoder/mediaProperty Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,21 +20,21 @@ FileProperties::FileProperties( const FormatContext& formatContext )
20
20
21
21
std::string FileProperties::getFilename () const
22
22
{
23
- if ( ! _formatContext )
23
+ if ( ! _formatContext || ! _formatContext-> filename )
24
24
throw std::runtime_error ( " unknown format context" );
25
25
return _formatContext->filename ;
26
26
}
27
27
28
28
std::string FileProperties::getFormatName () const
29
29
{
30
- if ( ! _formatContext || ! _formatContext->iformat )
30
+ if ( ! _formatContext || ! _formatContext->iformat || ! _formatContext-> iformat -> name )
31
31
throw std::runtime_error ( " unknown format context" );
32
32
return _formatContext->iformat ->name ;
33
33
}
34
34
35
35
std::string FileProperties::getFormatLongName () const
36
36
{
37
- if ( ! _formatContext || ! _formatContext->iformat )
37
+ if ( ! _formatContext || ! _formatContext->iformat || ! _formatContext-> iformat -> long_name )
38
38
throw std::runtime_error ( " unknown format context" );
39
39
return _formatContext->iformat ->long_name ;
40
40
}
You can’t perform that action at this time.
0 commit comments