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

Commit e62e2637 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android Git Automerger
Browse files

am a2bc118c: am 2a0f484e: am a04c05ab: Merge "Truncate file before recording into it."

* commit 'a2bc118c':
  Truncate file before recording into it.
parents 16111eac a2bc118c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -252,6 +252,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);
    }