Skip to content

Commit f18ebae

Browse files
author
Clement Champetier
committed
InputFile: fix build of getFormatMimeType() when libavformat <= 55
1 parent c5fcc68 commit f18ebae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/AvTranscoder/file/InputFile.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,14 @@ std::string InputFile::getFormatLongName() const
133133

134134
std::string InputFile::getFormatMimeType() const
135135
{
136+
#if LIBAVFORMAT_VERSION_MAJOR <= 55
137+
LOG_WARN("Cannot get mime type format of '" << _filename << "' because your libavformat library has a major version <= 55.")
138+
return "not available";
139+
#else
136140
if( _formatContext.getAVInputFormat().mime_type == NULL )
137141
return "unknown";
138142
return std::string(_formatContext.getAVInputFormat().mime_type);
143+
#endif
139144
}
140145

141146
double InputFile::getFps()

0 commit comments

Comments
 (0)