Handle IOException from MediaCodec factory methods

Bug: 11364276
Change-Id: I930f37e8c2cba77e1da3d6a6878186182282b51e
Signed-off-by: Andy Hung <hunga@google.com>
This commit is contained in:
Andy Hung
2014-01-14 17:33:44 -08:00
parent 1d708f6bdd
commit 641456cdcc
2 changed files with 31 additions and 19 deletions

View File

@@ -499,7 +499,8 @@ class MediaCodecView extends SurfaceView
}
private void addTrack(
int trackIndex, MediaFormat format, boolean encrypted) {
int trackIndex, MediaFormat format, boolean encrypted)
throws IOException {
String mime = format.getString(MediaFormat.KEY_MIME);
boolean isVideo = mime.startsWith("video/");