Skip to content

Commit 1a512f9

Browse files
author
Clement Champetier
committed
Transcoder: refactored private method addTranscodeStream
Added a local variable.
1 parent 222c48f commit 1a512f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/AvTranscoder/transcoder/Transcoder.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,15 @@ void Transcoder::addTranscodeStream(const InputStreamDesc& inputStreamDesc, cons
234234

235235
// Add input file
236236
InputFile* referenceFile = addInputFile(inputStreamDesc._filename, inputStreamDesc._streamIndex, offset);
237+
IInputStream& inputStream = referenceFile->getStream(inputStreamDesc._streamIndex);
237238

238-
switch(referenceFile->getStream(inputStreamDesc._streamIndex).getProperties().getStreamType())
239+
switch(inputStream.getProperties().getStreamType())
239240
{
240241
case AVMEDIA_TYPE_VIDEO:
241242
case AVMEDIA_TYPE_AUDIO:
242243
{
243244
_streamTranscodersAllocated.push_back(
244-
new StreamTranscoder(referenceFile->getStream(inputStreamDesc._streamIndex), _outputFile, profile,
245-
inputStreamDesc._channelIndexArray, offset));
245+
new StreamTranscoder(inputStream, _outputFile, profile, inputStreamDesc._channelIndexArray, offset));
246246
_streamTranscoders.push_back(_streamTranscodersAllocated.back());
247247
break;
248248
}

0 commit comments

Comments
 (0)