Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
msandroidcamera2
Commits
267b72c1
Commit
267b72c1
authored
May 27, 2020
by
Sylvain Berfini
🎩
Committed by
Simon Morlat
Jun 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trying to set null image listener when stopping capture
parent
9f6dbf7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
android-camera2-capture.cpp
android-camera2-capture.cpp
+10
-5
No files found.
android-camera2-capture.cpp
View file @
267b72c1
...
...
@@ -507,6 +507,16 @@ static void android_camera2_capture_stop(AndroidCamera2Context *d) {
}
d
->
capturing
=
false
;
if
(
d
->
imageReaderListener
)
{
delete
d
->
imageReaderListener
;
d
->
imageReaderListener
=
nullptr
;
}
AImageReader_ImageListener
nullListener
=
{
nullptr
,
nullptr
};
media_status_t
status
=
AImageReader_setImageListener
(
d
->
imageReader
,
&
nullListener
);
if
(
status
!=
AMEDIA_OK
)
{
ms_error
(
"[Camera2 Capture] Failed to set null image listener, error is %i"
,
status
);
}
if
(
d
->
captureSession
)
{
camera_status_t
camera_status
=
ACameraCaptureSession_abortCaptures
(
d
->
captureSession
);
if
(
camera_status
!=
ACAMERA_OK
)
{
...
...
@@ -565,11 +575,6 @@ static void android_camera2_capture_stop(AndroidCamera2Context *d) {
if
(
d
->
imageReader
)
{
AImageReader_delete
(
d
->
imageReader
);
d
->
imageReader
=
nullptr
;
if
(
d
->
imageReaderListener
)
{
delete
d
->
imageReaderListener
;
d
->
imageReaderListener
=
nullptr
;
}
}
android_camera2_capture_destroy_preview
(
d
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment