Skip to content

Commit 6c3ea36

Browse files
author
Valentin Noel
committed
AvInputStream: remove audio codec block_align setting
No need to set it, FFmpeg do it for us
1 parent 76caaba commit 6c3ea36

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/AvTranscoder/codedStream/AvInputStream.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ AvInputStream::AvInputStream( InputFile& inputFile, const size_t streamIndex )
3535
}
3636
case AVMEDIA_TYPE_AUDIO:
3737
{
38-
double outputFps = 25;
39-
size_t bytePerSample = av_get_bytes_per_sample( context->sample_fmt );
40-
41-
context->block_align = 1.0 * context->sample_rate * context->channels * bytePerSample / outputFps;
42-
// std::cout << "channels " << context->channel_layout << std::endl;
43-
// std::cout << "audio buffer read size " << context->block_align << std::endl;
44-
4538
AudioCodec* audioCodec = new AudioCodec( eCodecTypeDecoder, context->codec_id );
4639
audioCodec->setAudioParameters( context->sample_rate, context->channels, context->sample_fmt );
4740

0 commit comments

Comments
 (0)