filter/ffmpeg: use av_buffersrc_add_frame() instead of av_buffersrc_write_frame()

This transfers ownership of the buffer instead of adding another reference.
This commit is contained in:
Max Kellermann 2019-03-24 22:28:40 +01:00
parent a21c6884f2
commit cc1822810f
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ FfmpegFilter::FilterPCM(ConstBuffer<void> src)
memcpy(in_frame.GetData(0), src.data, src.size);
int err = av_buffersrc_write_frame(buffer_src.get(), in_frame.get());
int err = av_buffersrc_add_frame(buffer_src.get(), in_frame.get());
if (err < 0)
throw MakeFfmpegError(err, "av_buffersrc_write_frame() failed");