Skip to content

Commit 2d06675

Browse files
author
Clement Champetier
committed
StreamTranscoder: fixed amerge option if there are more than 2 inputs
2 inputs is the default value for this filter.
1 parent 27a65ac commit 2d06675

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/AvTranscoder/transcoder/StreamTranscoder.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,11 @@ StreamTranscoder::StreamTranscoder(const std::vector<InputStreamDesc>& inputStre
188188
_filterGraph = new FilterGraph(inputStream.getAudioCodec());
189189
// merge two or more audio streams into a single multi-channel stream.
190190
if(inputStreams.size() > 1)
191-
_filterGraph->addFilter("amerge");
191+
{
192+
std::stringstream mergeOptions;
193+
mergeOptions << "inputs=" << inputStreams.size();
194+
_filterGraph->addFilter("amerge", mergeOptions.str());
195+
}
192196

193197
// output encoder
194198
AudioEncoder* outputAudio = new AudioEncoder(profile.at(constants::avProfileCodec));

0 commit comments

Comments
 (0)