diff options
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index 3d093fa..86639cb 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -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); } |