packages
packages copied to clipboard
[camera_avfoundation] do not append sample buffer when readyForMoreMediaData is NO to avoid crash
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
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [x] I read the Tree Hygiene page, which explains my responsibilities.
- [x] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use
dart format.) - [x] I signed the CLA.
- [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g.
[shared_preferences] - [x] I linked to at least one issue that this PR fixes in the description above.
- [x] I updated
pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes. - [x] I updated
CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes. - [x] I updated/added relevant documentation (doc comments with
///). - [x] I added new tests to check the change I am making, or this PR is test-exempt.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel on Discord.
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.
I think we can close that issue too, and ask people to update the version.
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?
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.
From triage: this was missing a second review request.