[Libav-user] Memory issues when using the trim filter
t.rapp at noa-archive.com
Thu Apr 11 10:14:29 EEST 2019
On 10.04.2019 22:10, Carl Eugen Hoyos wrote:
> 2019-04-10 15:00 GMT+02:00, Tobias Rapp <t.rapp at noa-archive.com>:
>> So possibly the AVPacket reference is not dropped anymore after trim has
>> reached its end position?
> That's what I thought when I read your original description, no more
> useful ideas here, sorry!
The increasing memory usage did not happen when I tested the trim filter
with ffmpeg. After looking at the buffersrc/buffersink calls therein I
added AV_BUFFERSRC_FLAG_PUSH to the av_buffersrc_add_frame_flags
function call in filtering_video.c . This seems to solve the memory problem.
As my application is working file-to-file I guess it makes no difference
to switch to the push-based filtergraph instead of pull-based. Is using
AV_BUFFERSINK_FLAG_NO_REQUEST mandatory in this scenario?
More information about the Libav-user