diff --git a/services/drm_service/client/src/mediakeysystem_service_proxy.cpp b/services/drm_service/client/src/mediakeysystem_service_proxy.cpp index 2c8c10e1..66c17493 100644 --- a/services/drm_service/client/src/mediakeysystem_service_proxy.cpp +++ b/services/drm_service/client/src/mediakeysystem_service_proxy.cpp @@ -62,7 +62,8 @@ int32_t MediaKeySystemServiceProxy::GenerateKeySystemRequest(std::vectorGenerateKeySystemRequest(request, defaultUrl); DRM_CHECK_AND_RETURN_RET_LOG(ret == DRM_OK, ret, "ProcessKeySystemRequest faild, errCode:%{public}d", ret); + if (!reply.WriteString(defaultUrl)) { + DRM_ERR_LOG("MediaKeySystemServiceStub Write GenerateKeySystemRequest failed"); + return IPC_STUB_WRITE_PARCEL_ERR; + } if (!reply.WriteInt32(request.size())) { DRM_ERR_LOG("MediaKeySystemServiceStub Write request size failed"); return IPC_STUB_WRITE_PARCEL_ERR; @@ -143,10 +147,6 @@ static int32_t ProcessKeySystemRequest(MediaKeySystemServiceStub *stub, MessageP return IPC_STUB_WRITE_PARCEL_ERR; } } - if (!reply.WriteString(defaultUrl)) { - DRM_ERR_LOG("MediaKeySystemServiceStub Write GenerateKeySystemRequest failed"); - return IPC_STUB_WRITE_PARCEL_ERR; - } DRM_INFO_LOG("MediaKeySystemServiceStub MEDIA_KEY_SYSTEM_GENERATE_KEYSYSTEM_REQUEST exit."); return ret; }