lu-zero / bmdtools

Basic capture and play programs for Blackmagic Design Decklink
Boost Software License 1.0
198 stars 74 forks source link

memlimit is ignored. #101

Open themusicalduck opened 6 years ago

themusicalduck commented 6 years ago

I've noticed while using bmdcapture to pipe capture card input into a video player, if I pause the video player, bmdcapture will fill memory up until the point my system crashes.

The flag -M for memlimit seems to be ignored as well as the 1GB default.

Video demonstrating the problem: http://ks361234.kimsufi.com/bmdcapture.mkv

You can see mpv fill its cache before bmdcapture starts to fill up memory indefinitely well beyond the 1GB limit.

I didn't record it, but after unpausing the video the memory clears itself immediately and bmdcapture stops running after pushing out a few more seconds of video.

I'm using the latest version compiled from this git on Ubuntu 18.04 64 bit with a Blackmagic Design Intensity Pro 4K card.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/60759294-memlimit-is-ignored?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F256764&utm_medium=issues&utm_source=github).
lu-zero commented 6 years ago

I'm not sure how the memory in a pipe is accounted for by top

The limit is on the internal frame queue.

themusicalduck commented 6 years ago

Ok, thanks for your reply.

I've been able to limit memory use in another way.