mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 14:02:57 +02:00
Remove naked malloc (or similar) and free in: FFmpeg
This commit is contained in:
@@ -386,10 +386,10 @@ int import_ffmpeg_decode_frame(streamContext *sc, bool flushing)
|
||||
}
|
||||
|
||||
sc->m_samplefmt = sc->m_codecCtx->sample_fmt;
|
||||
sc->m_samplesize = av_get_bytes_per_sample(sc->m_samplefmt);
|
||||
sc->m_samplesize = static_cast<size_t>(av_get_bytes_per_sample(sc->m_samplefmt));
|
||||
|
||||
int channels = sc->m_codecCtx->channels;
|
||||
unsigned int newsize = sc->m_samplesize * frame->nb_samples * channels;
|
||||
auto 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 )
|
||||
|
Reference in New Issue
Block a user