Fix/suppress new warnings introduced in Chromium roll.

TBR=henrika@webrtc.org

Bug: webrtc:6597
Change-Id: Id26945a7be05250673b58de8220f78bc62886688
Reviewed-on: https://webrtc-review.googlesource.com/16860
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20477}
This commit is contained in:
Sami Kalliomäki
2017-10-30 13:34:41 +01:00
committed by Commit Bot
parent 1d4c152a38
commit bde473e4fa
26 changed files with 67 additions and 42 deletions

View File

@ -15,6 +15,7 @@ import android.os.HandlerThread;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.concurrent.CountDownLatch;
@ -57,7 +58,7 @@ public class VideoFileRenderer implements VideoRenderer.Callbacks {
videoOutFile = new FileOutputStream(outputFile);
videoOutFile.write(
("YUV4MPEG2 C420 W" + outputFileWidth + " H" + outputFileHeight + " Ip F30:1 A1:1\n")
.getBytes());
.getBytes(Charset.forName("US-ASCII")));
renderThread = new HandlerThread(TAG);
renderThread.start();
@ -149,7 +150,7 @@ public class VideoFileRenderer implements VideoRenderer.Callbacks {
ThreadUtils.awaitUninterruptibly(cleanupBarrier);
try {
for (ByteBuffer buffer : rawFrames) {
videoOutFile.write("FRAME\n".getBytes());
videoOutFile.write("FRAME\n".getBytes(Charset.forName("US-ASCII")));
byte[] data = new byte[outputFrameSize];
buffer.get(data);