media: Add volatile to mThreadStarted to make sure the thread can stop properly.

Bug: 25446694
Change-Id: I85a6caeb6f06bffb97be572a93374b5e8c0f64ca
diff --git a/tests/tests/media/src/android/media/cts/MediaCodecCencPlayer.java b/tests/tests/media/src/android/media/cts/MediaCodecCencPlayer.java
index 2473078..f5856ed 100644
--- a/tests/tests/media/src/android/media/cts/MediaCodecCencPlayer.java
+++ b/tests/tests/media/src/android/media/cts/MediaCodecCencPlayer.java
@@ -54,7 +54,7 @@
 
     private boolean mEncryptedAudio;
     private boolean mEncryptedVideo;
-    private boolean mThreadStarted = false;
+    private volatile boolean mThreadStarted = false;
     private byte[] mSessionId;
     private CodecState mAudioTrackState;
     private int mMediaFormatHeight;
@@ -304,7 +304,7 @@
         CodecState state;
         if (isVideo) {
             state = new CodecState((MediaTimeProvider)this, mVideoExtractor,
-                            trackIndex, format, codec, true, false, 
+                            trackIndex, format, codec, true, false,
                             AudioManager.AUDIO_SESSION_ID_GENERATE);
             mVideoCodecStates.put(Integer.valueOf(trackIndex), state);
         } else {