Bug 1332177 - handle ICodec.configure() failure. r=jchen
authorJohn Lin <jolin@mozilla.com>
Thu, 19 Jan 2017 16:11:01 +0800
changeset 375223 69843027051d2c05dd704e943da661a2f950998a
parent 375222 ba650eee2f3b1c340bdbcef33ad16c8d552e1e3d
child 375224 fe22af79bacf6db526737536eab551caf68ba440
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs1332177
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1332177 - handle ICodec.configure() failure. r=jchen MozReview-Commit-ID: KPhI04EA9n3
mobile/android/base/java/org/mozilla/gecko/media/CodecProxy.java
--- a/mobile/android/base/java/org/mozilla/gecko/media/CodecProxy.java
+++ b/mobile/android/base/java/org/mozilla/gecko/media/CodecProxy.java
@@ -119,17 +119,19 @@ public final class CodecProxy {
         mOutputSurface = surface;
         mRemoteDrmStubId = drmStubId;
         mCallbacks = new CallbacksForwarder(callbacks);
     }
 
     boolean init(ICodec remote) {
         try {
             remote.setCallbacks(mCallbacks);
-            remote.configure(mFormat, mOutputSurface, 0, mRemoteDrmStubId);
+            if (!remote.configure(mFormat, mOutputSurface, 0, mRemoteDrmStubId)) {
+                return false;
+            }
             remote.start();
         } catch (RemoteException e) {
             e.printStackTrace();
             return false;
         }
 
         mRemote = remote;
         return true;