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

Commit a04c05ab authored by Marco Nelissen's avatar Marco Nelissen Committed by Gerrit Code Review
Browse files

Merge "Truncate file before recording into it."

parents 1914e7ed 69113e8c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -260,6 +260,9 @@ status_t StagefrightRecorder::setOutputFile(int fd, int64_t offset, int64_t leng
        return -EBADF;
    }

    // start with a clean, empty file
    ftruncate(fd, 0);

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