Skip to content

Commit 7187589

Browse files
author
Clement Champetier
committed
util: remove getFormat() function
Not necessary since InputFile/OutputFile can return the format name... And much more!
1 parent 0b7fbdc commit 7187589

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

src/AvTranscoder/util.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,6 @@ extern "C" {
1212
namespace avtranscoder
1313
{
1414

15-
std::string getFormat( const std::string& filename )
16-
{
17-
std::string format( "" );
18-
19-
AVOutputFormat* avOutputFormat = av_guess_format( NULL, filename.c_str(), NULL);
20-
if( avOutputFormat )
21-
{
22-
if( avOutputFormat->name )
23-
format = std::string( avOutputFormat->name );
24-
}
25-
26-
return format;
27-
}
28-
2915
bool matchFormat( const std::string& format, const std::string& filename )
3016
{
3117
AVOutputFormat* avOutputFormat = av_guess_format( format.c_str(), filename.c_str(), NULL);

src/AvTranscoder/util.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ namespace avtranscoder
1919
typedef std::map<std::string, OptionArray> OptionArrayMap;
2020
typedef std::vector< std::pair<std::string, std::string> > NamesArray; //< short/long names of format/video codec/audio codec
2121

22-
/**
23-
* @brief Get format name from a given filename
24-
*/
25-
std::string AvExport getFormat( const std::string& filename );
26-
2722
/**
2823
* @brief Check if a format name corresponds to the format of a given filename
2924
*/

0 commit comments

Comments
 (0)