mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-03 06:03:13 +02:00
Fix audio size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Benjamin Drung <bdrung@debian.org>
This commit is contained in:
parent
5ae8679e3c
commit
373b8fa049
@ -491,7 +491,6 @@ int import_ffmpeg_decode_frame(streamContext *sc, bool flushing)
|
||||
frame, // out
|
||||
&got_output, // out
|
||||
&avpkt); // in
|
||||
sc->m_decodedAudioSamplesValidSiz = frame->nb_samples;
|
||||
|
||||
if (nBytesDecoded < 0)
|
||||
{
|
||||
@ -504,6 +503,7 @@ int import_ffmpeg_decode_frame(streamContext *sc, bool flushing)
|
||||
|
||||
int channels = sc->m_codecCtx->channels;
|
||||
unsigned int newsize = sc->m_samplesize * frame->nb_samples * channels;
|
||||
sc->m_decodedAudioSamplesValidSiz = newsize;
|
||||
// Reallocate the audio sample buffer if it's smaller than the frame size.
|
||||
if (newsize > sc->m_decodedAudioSamplesSiz )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user