Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6e96a91 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

stagefright: propagate nativeHandle properly for secure playback

- fix prototype constness (so ACodec can pass handle to client)
- fix handle passing to decrypt

Bug: 26782004
Change-Id: Ia2f85ded66fbb459a9db8096eb5b9e34ef45ce16
parent 78229d88
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ struct CodecBase : public AHandler {
        virtual size_t countBuffers() = 0;
        virtual IOMX::buffer_id bufferIDAt(size_t index) const = 0;
        virtual sp<ABuffer> bufferAt(size_t index) const = 0;
        virtual sp<NativeHandle> handleAt(size_t index) { return NULL; };
        virtual sp<NativeHandle> handleAt(size_t index) const { return NULL; };
        virtual sp<RefBase> memRefAt(size_t index) const { return NULL; }

    protected:
+1 −1
Original line number Diff line number Diff line
@@ -2498,7 +2498,7 @@ status_t MediaCodec::onQueueInputBuffer(const sp<AMessage> &msg) {
        ICrypto::DestinationType dst_type = ICrypto::kDestinationTypeOpaqueHandle;

        if (info->mNativeHandle != NULL) {
            dst_pointer = (void *)info->mNativeHandle.get();
            dst_pointer = (void *)info->mNativeHandle->handle();
            dst_type = ICrypto::kDestinationTypeNativeHandle;
        } else if ((mFlags & kFlagIsSecure) == 0) {
            dst_type = ICrypto::kDestinationTypeVmPointer;