Skip to content

Fix dummy stream #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 15, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/AvTranscoder/DatasStructures/AudioDesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ AudioDesc::AudioDesc( const AVCodecID codecId )
setAudioCodec( codecId );
}

AudioDesc::AudioDesc( const AudioDesc& audioDesc )
: m_codec( NULL )
, m_codecContext( NULL )
{
setAudioCodec( audioDesc.getAudioCodecId() );
}

void AudioDesc::setAudioCodec( const std::string& codecName )
{
avcodec_register_all(); // Warning: should be called only once
Expand Down
2 changes: 0 additions & 2 deletions src/AvTranscoder/DatasStructures/AudioDesc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ class AvExport AudioDesc
AudioDesc( const std::string& codecName = "" );
AudioDesc( const AVCodecID codecId );

AudioDesc( const AudioDesc& audioDesc );

void setAudioCodec( const std::string& codecName );
void setAudioCodec( const AVCodecID codecId );

Expand Down
8 changes: 7 additions & 1 deletion src/AvTranscoder/Transcoder/StreamTranscoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ StreamTranscoder::StreamTranscoder(
, _outputEssence( NULL )
, _transform( NULL )
, _transcodeStream( false )
, _dummyStream( false )
{
// create a re-wrapping case
switch( _inputStream->getStreamType() )
Expand Down Expand Up @@ -58,6 +59,7 @@ StreamTranscoder::StreamTranscoder(
, _outputEssence( NULL )
, _transform( NULL )
, _transcodeStream( true )
, _dummyStream( false )
{
// create a transcode case
switch( _inputStream->getStreamType() )
Expand Down Expand Up @@ -121,7 +123,9 @@ StreamTranscoder::StreamTranscoder(
, _outputEssence( NULL )
, _transform( NULL )
, _transcodeStream( true )
, _dummyStream( true )
{
// create a dummy case
if( ! profile.count( Profile::avProfileType ) )
throw std::runtime_error( "unable to found stream type (audio, video, etc.)" );

Expand Down Expand Up @@ -168,7 +172,9 @@ StreamTranscoder::~StreamTranscoder()
{
if( _frameBuffer )
delete _frameBuffer;
if( _inputEssence )
if( _sourceBuffer )
delete _sourceBuffer;
if( _inputEssence && ! _dummyStream )
delete _inputEssence;
if( _outputEssence )
delete _outputEssence;
Expand Down
3 changes: 1 addition & 2 deletions src/AvTranscoder/Transcoder/StreamTranscoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ class StreamTranscoder
EssenceTransform* _transform;

bool _transcodeStream;


bool _dummyStream;
};

}
Expand Down