Skip to content

Commit 2fd9834

Browse files
author
Clement Champetier
committed
FormatContext: add AVDictionary parameter in constructor
1 parent b4d17c7 commit 2fd9834

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/AvTranscoder/file/FormatContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
namespace avtranscoder
77
{
88

9-
FormatContext::FormatContext( const std::string& filename, int req_flags )
9+
FormatContext::FormatContext( const std::string& filename, int req_flags, AVDictionary** options )
1010
: _avFormatContext( NULL )
1111
, _options()
1212
, _isOpen( false )
1313
{
14-
int ret = avformat_open_input( &_avFormatContext, filename.c_str(), NULL, NULL );
14+
int ret = avformat_open_input( &_avFormatContext, filename.c_str(), NULL, options );
1515
if( ret < 0 )
1616
{
1717
std::string msg = "unable to open file ";

src/AvTranscoder/file/FormatContext.hpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,16 @@ class AvExport FormatContext
2121
FormatContext& operator=( const FormatContext& formatContext );
2222

2323
public:
24-
FormatContext( const std::string& filename, int req_flags = 0 ); ///< Allocate an AVFormatContext by opening an input file
25-
FormatContext( int req_flags = 0 ); ///< Allocate an AVFormatContext with default values
24+
/**
25+
* @brief Allocate an AVFormatContext by opening an input file
26+
*/
27+
FormatContext( const std::string& filename, int req_flags = 0, AVDictionary** options = NULL );
28+
29+
/**
30+
* @brief Allocate an AVFormatContext with default values
31+
*/
32+
FormatContext( int req_flags = 0 );
33+
2634
~FormatContext();
2735

2836
/**

0 commit comments

Comments
 (0)