Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bb976e1 authored by Robert Shih's avatar Robert Shih
Browse files

Avoid the call to CameraSourceTimeLapse::trySettingVideoSize if initialization

failed in the parent class ctor CameraSource::CameraSource.

Bug: 11636771
Change-Id: I5e6bffc1ebeeb1c2b84d6ed2049b2b3676ac046a
parent 0f3984ed
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -185,6 +185,8 @@ protected:
    virtual void dataCallbackTimestamp(int64_t timestampUs, int32_t msgType,
            const sp<IMemory> &data);

    void releaseCamera();

private:
    friend class CameraSourceListener;

@@ -233,7 +235,6 @@ private:
                    int32_t frameRate);

    void stopCameraRecording();
    void releaseCamera();
    status_t reset();

    CameraSource(const CameraSource &);
+2 −1
Original line number Diff line number Diff line
@@ -81,7 +81,8 @@ CameraSourceTimeLapse::CameraSourceTimeLapse(
    mVideoWidth = videoSize.width;
    mVideoHeight = videoSize.height;

    if (!trySettingVideoSize(videoSize.width, videoSize.height)) {
    if (OK == mInitCheck && !trySettingVideoSize(videoSize.width, videoSize.height)) {
        releaseCamera();
        mInitCheck = NO_INIT;
    }