OSDN Git Service

Fixed sample video corrupted in MediaCodec mode.
authorEdwin Wong <edwinwong@google.com>
Wed, 11 Jul 2012 02:57:26 +0000 (19:57 -0700)
committerEdwin Wong <edwinwong@google.com>
Fri, 13 Jul 2012 18:34:10 +0000 (11:34 -0700)
Change-Id: Ibe11a83199f3db1ba6266a1a9e11c7fc24ceb554
related-to-bug: 6732061

include/media/hardware/CryptoAPI.h

index 810a443..44a0040 100644 (file)
@@ -70,7 +70,9 @@ struct CryptoPlugin {
     // At the java level these special errors will then trigger a
     // MediaCodec.CryptoException that gives clients access to both
     // the error code and the errorDetailMsg.
-    virtual status_t decrypt(
+    // Returns a non-negative result to indicate the number of bytes written
+    // to the dstPtr, or a negative result to indicate an error.
+    virtual ssize_t decrypt(
             bool secure,
             const uint8_t key[16],
             const uint8_t iv[16],