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

Commit aa56ede8 authored by James Dong's avatar James Dong Committed by Android Git Automerger
Browse files

am 0386d04b: am 581581fe: Merge "Fix all fd leaks in authoring engine" into gingerbread

Merge commit '0386d04b'

* commit '0386d04b':
  Fix all fd leaks in authoring engine
parents 2c46b6d2 0386d04b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <camera/ICamera.h>
#include <media/IMediaRecorderClient.h>
#include <media/IMediaRecorder.h>
#include <unistd.h>

namespace android {

@@ -373,6 +374,7 @@ status_t BnMediaRecorder::onTransact(
            int64_t offset = data.readInt64();
            int64_t length = data.readInt64();
            reply->writeInt32(setOutputFile(fd, offset, length));
            ::close(fd);
            return NO_ERROR;
        } break;
        case SET_VIDEO_SIZE: {
+5 −5
Original line number Diff line number Diff line
@@ -56,11 +56,6 @@ StagefrightRecorder::StagefrightRecorder()
StagefrightRecorder::~StagefrightRecorder() {
    LOGV("Destructor");
    stop();

    if (mOutputFd >= 0) {
        ::close(mOutputFd);
        mOutputFd = -1;
    }
}

status_t StagefrightRecorder::init() {
@@ -1158,6 +1153,11 @@ status_t StagefrightRecorder::stop() {
        mFlags = 0;
    }

    if (mOutputFd >= 0) {
        ::close(mOutputFd);
        mOutputFd = -1;
    }

    return OK;
}