Skip to content

Commit 52768ac

Browse files
author
Clement Champetier
committed
AudioTransform: resize the buffer of convert to fit the exact size
1 parent 30f6898 commit 52768ac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/AvTranscoder/transform/AudioTransform.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ void AudioTransform::updateOutputFrame( const size_t nbInputSamples, Frame& dstF
7676
// resize buffer of output frame
7777
const int dstSampleSize = av_get_bytes_per_sample( dst.desc().getSampleFormat() );
7878
const size_t bufferSizeNeeded = nbInputSamples * dst.desc().getChannels() * dstSampleSize;
79-
if( bufferSizeNeeded > dstFrame.getSize() )
80-
dstFrame.resize( bufferSizeNeeded );
79+
dstFrame.resize( bufferSizeNeeded );
8180

8281
// set nbSamples of output frame
8382
dst.setNbSamples( nbInputSamples );

0 commit comments

Comments
 (0)