commit | 07be0313c9447bd3a214eb9ec76b1fd037baeb3e | [log] [tgz] |
---|---|---|
author | Chong Zhang <chz@google.com> | Fri Feb 16 11:57:09 2018 -0800 |
committer | Chong Zhang <chz@google.com> | Thu Feb 22 18:51:54 2018 +0000 |
tree | d953cc2be33c137637c8cdf43f3c2a8381f8eba2 | |
parent | f8149eb6ae50ac373731984c817b52f3deb63a67 [diff] |
MediaMuxer: clear file content when writing to existing file bug: 73546869 Change-Id: I7f38ecef1035f1190effae38634d21a3a18cc09f
diff --git a/media/java/android/media/MediaMuxer.java b/media/java/android/media/MediaMuxer.java index 02c71b2..205ce8d 100644 --- a/media/java/android/media/MediaMuxer.java +++ b/media/java/android/media/MediaMuxer.java
@@ -328,6 +328,7 @@ RandomAccessFile file = null; try { file = new RandomAccessFile(path, "rws"); + file.setLength(0); FileDescriptor fd = file.getFD(); setUpMediaMuxer(fd, format); } finally {