Loading camera/ndk/impl/ACameraMetadata.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -215,7 +215,7 @@ ACameraMetadata::filterStreamConfigurations() { const int STREAM_HEIGHT_OFFSET = 2; const int STREAM_IS_INPUT_OFFSET = 3; camera_metadata_entry entry = mData.find(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS); if (entry.count == 0 || entry.count % 4 || entry.type != TYPE_INT32) { if (entry.count > 0 && (entry.count % 4 || entry.type != TYPE_INT32)) { ALOGE("%s: malformed available stream configuration key! count %zu, type %d", __FUNCTION__, entry.count, entry.type); return; Loading Loading @@ -243,9 +243,17 @@ ACameraMetadata::filterStreamConfigurations() { filteredStreamConfigs.push_back(isInput); } if (filteredStreamConfigs.size() > 0) { mData.update(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, filteredStreamConfigs); } entry = mData.find(ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS); if (entry.count > 0 && (entry.count % 4 || entry.type != TYPE_INT32)) { ALOGE("%s: malformed available depth stream configuration key! count %zu, type %d", __FUNCTION__, entry.count, entry.type); return; } Vector<int32_t> filteredDepthStreamConfigs; filteredDepthStreamConfigs.setCapacity(entry.count); Loading @@ -270,7 +278,11 @@ ACameraMetadata::filterStreamConfigurations() { filteredDepthStreamConfigs.push_back(height); filteredDepthStreamConfigs.push_back(isInput); } mData.update(ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, filteredDepthStreamConfigs); if (filteredDepthStreamConfigs.size() > 0) { mData.update(ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, filteredDepthStreamConfigs); } entry = mData.find(ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS); Vector<int32_t> filteredHeicStreamConfigs; Loading Loading
camera/ndk/impl/ACameraMetadata.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -215,7 +215,7 @@ ACameraMetadata::filterStreamConfigurations() { const int STREAM_HEIGHT_OFFSET = 2; const int STREAM_IS_INPUT_OFFSET = 3; camera_metadata_entry entry = mData.find(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS); if (entry.count == 0 || entry.count % 4 || entry.type != TYPE_INT32) { if (entry.count > 0 && (entry.count % 4 || entry.type != TYPE_INT32)) { ALOGE("%s: malformed available stream configuration key! count %zu, type %d", __FUNCTION__, entry.count, entry.type); return; Loading Loading @@ -243,9 +243,17 @@ ACameraMetadata::filterStreamConfigurations() { filteredStreamConfigs.push_back(isInput); } if (filteredStreamConfigs.size() > 0) { mData.update(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, filteredStreamConfigs); } entry = mData.find(ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS); if (entry.count > 0 && (entry.count % 4 || entry.type != TYPE_INT32)) { ALOGE("%s: malformed available depth stream configuration key! count %zu, type %d", __FUNCTION__, entry.count, entry.type); return; } Vector<int32_t> filteredDepthStreamConfigs; filteredDepthStreamConfigs.setCapacity(entry.count); Loading @@ -270,7 +278,11 @@ ACameraMetadata::filterStreamConfigurations() { filteredDepthStreamConfigs.push_back(height); filteredDepthStreamConfigs.push_back(isInput); } mData.update(ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, filteredDepthStreamConfigs); if (filteredDepthStreamConfigs.size() > 0) { mData.update(ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, filteredDepthStreamConfigs); } entry = mData.find(ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS); Vector<int32_t> filteredHeicStreamConfigs; Loading