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:
parent
a21c6884f2
commit
cc1822810f
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue