filter/ffmpeg: call av_frame_unref() before av_buffersink_get_frame()

Fix another memory leak.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/514
This commit is contained in:
Max Kellermann 2019-03-24 22:27:48 +01:00
parent 2700eed08d
commit a21c6884f2

View File

@ -66,6 +66,8 @@ FfmpegFilter::FilterPCM(ConstBuffer<void> src)
/* collect filtered data from the FFmpeg audio buffer sink */
out_frame.Unref();
err = av_buffersink_get_frame(buffer_sink.get(), out_frame.get());
if (err < 0) {
if (err == AVERROR(EAGAIN) || err == AVERROR_EOF)