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

Commit c95f046e authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Fix possible media extractor service crash"

parents e8b0ace5 c22c00c8
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -65,7 +65,13 @@ status_t BnMediaExtractorService::onTransact(

        case MAKE_EXTRACTOR: {
            CHECK_INTERFACE(IMediaExtractorService, data, reply);
            sp<IDataSource> source = interface_cast<IDataSource>(data.readStrongBinder());
            sp<IBinder> b;
            status_t ret = data.readStrongBinder(&b);
            if (ret != NO_ERROR || b == NULL) {
                ALOGE("Error reading source from parcel");
                return ret;
            }
            sp<IDataSource> source = interface_cast<IDataSource>(b);
            const char *mime = data.readCString();
            sp<IMediaExtractor> ex = makeExtractor(source, mime);
            reply->writeStrongBinder(IInterface::asBinder(ex));