rpi-ffmpeg icon indicating copy to clipboard operation
rpi-ffmpeg copied to clipboard

v4l2_req_media: let media_request takes reference of media_pool

Open peat-psuwit opened this issue 1 year ago • 3 comments

This prevents media_pool from being freed before all requests are returned to it.

Fixes: #78

peat-psuwit avatar Mar 02 '24 19:03 peat-psuwit

I think this shouldn't be needed with the current version. I believe I've fixed it by making sure the buffers are returned as expected before the pool dies.

jc-kynesim avatar Mar 04 '24 18:03 jc-kynesim

Hmm interesting. Do you mean this commit? Since it's on test/5.1.4/main branch and I'm currently using test/6.0.1/main I missed that. Will make sure to include this commit and test again. In fact, I think I should switch back to 5.1.4, probably to the tagged version even (NixOS makes it easy to switch).

peat-psuwit avatar Mar 04 '24 18:03 peat-psuwit

Yup. There was no intention for that pool or its entries to survive the death of the decoder. The decoded buffers have to (and have the logic to do so) but the media objects can and should be reclaimed on shutdown. If I get my act together I'll update the other branches I claim to maintain today or tomorrow, but right now 5.1.4 is where stuff goes first (it what PiOS uses).

jc-kynesim avatar Mar 05 '24 09:03 jc-kynesim

As the project has taken another approach, I'll close this PR.

peat-psuwit avatar Jun 01 '24 19:06 peat-psuwit