Fixed some big memory leaks with audio samples and ffmpeg (pprof ./openshot-example "/tmp/openshot-example.30691._main_-end.heap" --inuse_objects --lines --heapcheck --edgefraction=1e-10 --nodefraction=1e-10 --gv

This commit is contained in:
Jonathan Thomas
2015-03-04 15:26:08 -06:00
parent c27e4a1426
commit b703f44f7c
4 changed files with 48 additions and 28 deletions

View File

@@ -995,7 +995,7 @@ void FFmpegReader::ProcessAudioPacket(int requested_frame, int target_frame, int
// Convert audio samples
nb_samples = avresample_convert(avr, // audio resample context
audio_converted->data, // output data pointers
audio_converted->data, // output data pointers
audio_converted->linesize[0], // output plane size, in bytes. (0 if unknown)
audio_converted->nb_samples, // maximum number of samples that the output buffer can hold
audio_frame->data, // input data pointers