packages icon indicating copy to clipboard operation
packages copied to clipboard

[camera_avfoundation] do not append sample buffer when readyForMoreMediaData is NO to avoid crash

Open misos1 opened this issue 1 year ago • 4 comments

Sample buffer is not appended when readyForMoreMediaData is NO to avoid crash.

Fix https://github.com/flutter/flutter/issues/132073 Fix https://github.com/flutter/flutter/issues/69874

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

misos1 avatar Jun 10 '24 19:06 misos1

Does it also fix flutter/flutter#69874?

I cannot reproduce with steps from that issue (and without patch from this PR, that is also why I created new issue which is practically duplicate of #69874 but with steps with which I was able to reproduce that more reliably, I mentioned #69874 in that issue) but I suppose it is the same thing, there is just a single call to appendPixelBuffer in the whole camera_avfoundation project.

misos1 avatar Jun 11 '24 19:06 misos1

I think we can close that issue too, and ask people to update the version.

hellohuanlin avatar Jun 11 '24 19:06 hellohuanlin

Actually after looking closely that issue was already closed at the time I posted https://github.com/flutter/flutter/issues/132073 and was reopened just last month, so that is why I needed to create new one instead of just pasting my code sample into that old one, and mentioned only my issue in this PR. So feel free to close that issue again, or should I mention it in this PR to be closed automatically after merge?

misos1 avatar Jun 11 '24 20:06 misos1

That issue was closed in error (there were no fix before). Please link it as a fix to that issue. We can re-open if encounter it again.

hellohuanlin avatar Jun 11 '24 20:06 hellohuanlin

From triage: this was missing a second review request.

stuartmorgan-g avatar Jul 09 '24 19:07 stuartmorgan-g