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

Commit 53d35030 authored by Robert Shih's avatar Robert Shih Committed by Android (Google) Code Review
Browse files

Merge "MPEG4Writer: fail init check if output fd is not seekable" into mnc-dev

parents 26a48f30 2aa74dc0
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -385,6 +385,13 @@ MPEG4Writer::MPEG4Writer(int fd)
      mStartTimeOffsetMs(-1),
      mMetaKeys(new AMessage()) {
    addDeviceMeta();

    // Verify mFd is seekable
    off64_t off = lseek64(mFd, 0, SEEK_SET);
    if (off < 0) {
        ALOGE("cannot seek mFd: %s (%d)", strerror(errno), errno);
        release();
    }
}

MPEG4Writer::~MPEG4Writer() {