Skip to content

Commit fa914bb

Browse files
author
Clement Champetier
committed
CodedDesc: add constructor
Construct a CodedDesc from an AVCodec and an AVCodecContext.
1 parent bfddb81 commit fa914bb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/AvTranscoder/CodedStructures/CodedDesc.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ CodedDesc::CodedDesc( const AVCodecID codecId )
3131
setCodec( codecId );
3232
}
3333

34+
CodedDesc::CodedDesc( AVCodec& avCodec, AVCodecContext& avCodecContext )
35+
: m_codec( &avCodec )
36+
, m_codecContext( &avCodecContext )
37+
{
38+
39+
}
40+
3441
std::string CodedDesc::getCodecName() const
3542
{
3643
assert( m_codecContext != NULL );

src/AvTranscoder/CodedStructures/CodedDesc.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class AvExport CodedDesc
1616
public:
1717
CodedDesc( const std::string& codecName );
1818
CodedDesc( const AVCodecID codecId );
19+
CodedDesc( AVCodec& avCodec, AVCodecContext& avCodecContext );
1920

2021
virtual ~CodedDesc() {}
2122

0 commit comments

Comments
 (0)