Skip to content

Commit efe4e03

Browse files
set audio buffer in relation of the video stream
note: actually only support 24bps at 25fps
1 parent 3488505 commit efe4e03

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/AvTranscoder/InputStream.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,14 @@ void InputStream::init( const std::string& filename )
132132
m_formatContext = NULL;
133133
throw std::runtime_error( "unable to find stream informations" );
134134
}
135+
135136
assert( m_formatContext != NULL );
137+
138+
if( m_formatContext->streams[m_streamIndex]->codec->codec_type == AVMEDIA_TYPE_AUDIO )
139+
{
140+
// TODO: get dynamic buffer size in relation with video stream
141+
m_formatContext->streams[m_streamIndex]->codec->block_align = 3 * 1920; // 24 bits per audio sample at 25fps
142+
}
136143
}
137144

138145
}

0 commit comments

Comments
 (0)