Skip to content

Commit 3864d7e

Browse files
author
Valentin NOEL
committed
FilterGraph: improve input frame size computing
1 parent cb8ae5d commit 3864d7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/AvTranscoder/filter/FilterGraph.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ size_t FilterGraph::getMinInputFrameSize(const std::vector<IFrame*>& inputs)
140140
int minFrameSize = inputs.at(0)->getDataSize();
141141
for(size_t index = 1; index < inputs.size(); ++index)
142142
{
143-
if(minFrameSize > inputs.at(index)->getDataSize())
143+
// if the input frame is shorter, and if there is no data enough into the corresponding frame buffer
144+
if(minFrameSize > inputs.at(index)->getDataSize() && minFrameSize > _inputFramesBuffer.at(index).getDataSize())
144145
minFrameSize = inputs.at(index)->getDataSize();
145146
}
146147
return minFrameSize;

0 commit comments

Comments
 (0)