From b428c88596d26e4721aee0de778c810f4480b529 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Fri, 9 Oct 2015 18:41:32 +0200 Subject: [PATCH] OutputFile: fix AVCodecContext of stream when addAudioStream When create a new audio stream, indicate in the codec the number of samples per channel in an audio frame. --- src/AvTranscoder/file/OutputFile.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AvTranscoder/file/OutputFile.cpp b/src/AvTranscoder/file/OutputFile.cpp index 910b7d95..346efe2c 100644 --- a/src/AvTranscoder/file/OutputFile.cpp +++ b/src/AvTranscoder/file/OutputFile.cpp @@ -74,6 +74,7 @@ IOutputStream& OutputFile::addAudioStream( const AudioCodec& audioDesc ) stream.codec->sample_rate = audioDesc.getAVCodecContext().sample_rate; stream.codec->channels = audioDesc.getAVCodecContext().channels; stream.codec->sample_fmt = audioDesc.getAVCodecContext().sample_fmt; + stream.codec->frame_size = audioDesc.getAVCodecContext().frame_size; // need to set the time_base on the AVCodecContext of the AVStream av_reduce(