mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Avoid segfaults if disconnect USB camera while preview."
am: 4dce57e459
Change-Id: I08b09d87cbaf4ed3c18ccbd5cd28b3de8fa4c8e4
This commit is contained in:
@@ -1737,7 +1737,11 @@ bool ExternalCameraDeviceSession::OutputThread::threadLoop() {
|
|||||||
// TODO: see if we can save some computation by converting to YV12 here
|
// TODO: see if we can save some computation by converting to YV12 here
|
||||||
uint8_t* inData;
|
uint8_t* inData;
|
||||||
size_t inDataSize;
|
size_t inDataSize;
|
||||||
req->frameIn->map(&inData, &inDataSize);
|
if (req->frameIn->map(&inData, &inDataSize) != 0) {
|
||||||
|
lk.unlock();
|
||||||
|
return onDeviceError("%s: V4L2 buffer map failed", __FUNCTION__);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: in some special case maybe we can decode jpg directly to gralloc output?
|
// TODO: in some special case maybe we can decode jpg directly to gralloc output?
|
||||||
ATRACE_BEGIN("MJPGtoI420");
|
ATRACE_BEGIN("MJPGtoI420");
|
||||||
int res = libyuv::MJPGToI420(
|
int res = libyuv::MJPGToI420(
|
||||||
|
|||||||
Reference in New Issue
Block a user